Bugs item #6419, was opened at 2013-02-09 20:27 by Michal Ambroz
You can respond by visiting: 
https://wald.intevation.org/tracker/?func=detail&atid=220&aid=6419&group_id=29

Status: Open
Priority: 3
Submitted By: Michal Ambroz (rebus)
Assigned to: Nobody (None)
Summary: openvas-libraries 6 - memset used with size of pointer and not the 
buffer 
Architecture: 64 Bit
Product: OpenVAS
Operating System: Linux
Component: openvas-libraries
Version: None
Severity: normal
Resolution: None
Hardware: PC
URL: 


Initial Comment:
Issue found during build 
http://kojipkgs.fedoraproject.org//work/tasks/1940/4931940/build.log

The memset is called with size of the pointer and not with size of the buffer.

Here is the patch:
diff -ru openvas-libraries-6.0+beta3/nasl/md5.c 
openvas-libraries-6.0+beta3.new/nasl/md5.c
--- openvas-libraries-6.0+beta3/nasl/md5.c      2012-12-14 10:44:32.000000000 
+0100
+++ openvas-libraries-6.0+beta3.new/nasl/md5.c  2013-02-09 12:32:07.193209739 
+0100
@@ -142,7 +142,7 @@
     MD5Transform(ctx->buf, (uint32 *) ctx->in);
     byteReverse((unsigned char *) ctx->buf, 4);
     memmove(digest, ctx->buf, 16);
-    memset(ctx, 0, sizeof(ctx));       /* In case it's sensitive */
+    memset(ctx, 0, sizeof(*ctx));      /* In case it's sensitive */
 }
 
 /* The four core functions - F1 is optimized somewhat */

-----cut here -----
Best regards 
Michal Ambroz



----------------------------------------------------------------------

You can respond by visiting: 
https://wald.intevation.org/tracker/?func=detail&atid=220&aid=6419&group_id=29
_______________________________________________
Openvas-devel mailing list
Openvas-devel@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-devel

Reply via email to