Fix for "show applications like" (bug #2501)
authorMark Spencer <markster@digium.com>
Sat, 25 Sep 2004 22:42:17 +0000 (22:42 +0000)
committerMark Spencer <markster@digium.com>
Sat, 25 Sep 2004 22:42:17 +0000 (22:42 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3837 65c4cc65-6c06-0410-ace0-fbb531ad65f3

utils.c

diff --git a/utils.c b/utils.c
index 648c2ca..2557c31 100755 (executable)
--- a/utils.c
+++ b/utils.c
@@ -386,7 +386,7 @@ static char *upper(const char *orig, char *buf, int bufsize)
 char *ast_strcasestr(const char *haystack, const char *needle)
 {
        char *u1, *u2;
-       int u1len = strlen(haystack), u2len = strlen(needle);
+       int u1len = strlen(haystack) + 1, u2len = strlen(needle) + 1;
 
        u1 = alloca(u1len);
        u2 = alloca(u2len);