From: Tilghman Lesher Date: Wed, 1 Oct 2008 15:44:06 +0000 (+0000) Subject: Initializing buffer prevents a segfault when arguments are incomplete. X-Git-Tag: 1.6.2.0-beta1~1229 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38401621f5cce83adf4ad6be56322c5bc27eb251;p=thirdparty%2Fasterisk.git Initializing buffer prevents a segfault when arguments are incomplete. (closes issue #13471) Reported by: alecdavis Patches: 20080916__bug13471.diff.txt uploaded by Corydon76 (license 14) Tested by: alecdavis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145428 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_sms.c b/apps/app_sms.c index 3beda5030e..fba111d665 100644 --- a/apps/app_sms.c +++ b/apps/app_sms.c @@ -1744,7 +1744,7 @@ static int sms_exec(struct ast_channel *chan, void *data) sms_t h = { 0 }; /* argument parsing support */ struct ast_flags flags; - char *parse, *sms_opts[OPTION_ARG_ARRAY_SIZE]; + char *parse, *sms_opts[OPTION_ARG_ARRAY_SIZE] = { 0, }; char *p; AST_DECLARE_APP_ARGS(sms_args, AST_APP_ARG(queue);