]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix memory stomping bug in astman.
authorDavid M. Lee <dlee@digium.com>
Thu, 27 Feb 2014 16:23:11 +0000 (16:23 +0000)
committerDavid M. Lee <dlee@digium.com>
Thu, 27 Feb 2014 16:23:11 +0000 (16:23 +0000)
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.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409077 65c4cc65-6c06-0410-ace0-fbb531ad65f3

utils/astman.c

index 88573e5f9fd1b3de74698c7f9180928bc91cd295..19177028219d1ec2a7cb180486090feed9475d12 100644 (file)
@@ -738,7 +738,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",