From: David M. Lee Date: Thu, 27 Feb 2014 16:25:32 +0000 (+0000) Subject: Fix memory stomping bug in astman. X-Git-Tag: 12.2.0-rc1~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bf499290d67cb004b0fac2dd89c2ca6a4e63ca8;p=thirdparty%2Fasterisk.git Fix memory stomping bug in astman. This memset complained in dev mod on my Ubuntu box. The memset is both unnecessary and dangerous. At this point, m hasn't been initialized yet, so the memset will write off to whatever address happens to be on the stack at the time. ........ Merged revisions 409077 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 409083 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409087 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/utils/astman.c b/utils/astman.c index 6527e994a3..3e9ca8ffb8 100644 --- a/utils/astman.c +++ b/utils/astman.c @@ -737,7 +737,6 @@ static int manager_login(char *hostname) show_message("Login Failed", get_header(m, "Message")); } } else { - memset(m, 0, sizeof(*m)); manager_action("Login", "Username: %s\r\n" "Secret: %s\r\n",