Mageia Bugzilla – Attachment 9504 Details for
Bug 21126
valgrind new security issues CVE-2016-2226, CVE-2016-4487, CVE-2016-4488, CVE-2016-4489, CVE-2016-4490, CVE-2016-4491, CVE-2016-4492, CVE-2016-4493, CVE-2016-6131
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
file to compile and run valgrind to the executable
valgrindtest.c (text/plain), 251 bytes, created by
Herman Viaene
on 2017-07-18 15:10:59 CEST
(
hide
)
Description:
file to compile and run valgrind to the executable
Filename:
MIME Type:
Creator:
Herman Viaene
Created:
2017-07-18 15:10:59 CEST
Size:
251 bytes
patch
obsolete
>#include <stdlib.h> > > void f(void) > { > int* x = malloc(10 * sizeof(int)); > x[10] = 0; // problem 1: heap block overrun > } // problem 2: memory leak -- x not freed > > int main(void) > { > f(); > return 0; > }
#include <stdlib.h> void f(void) { int* x = malloc(10 * sizeof(int)); x[10] = 0; // problem 1: heap block overrun } // problem 2: memory leak -- x not freed int main(void) { f(); return 0; }
View Attachment As Raw
Actions:
View
Attachments on
bug 21126
: 9504