[Bug c++/69687] Buffer Overflow in libiberty
boehme.marcel at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Feb 7 07:04:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69687
--- Comment #7 from Marcel Böhme <boehme.marcel at gmail dot com> ---
Created attachment 37620
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37620&action=edit
Valgrind This
$ cat compileme.c
#include<stdio.h>
#include<stdlib.h>
const char*
____________________X00020A___R0020A__U000R03000N99999999_020A__K000(){
char *p;
p = (char *) malloc(19);
p = (char *) malloc(12);
free(p);
p = (char *) malloc(16);
return "Hello World!";
}
int main()
{
printf("%s\n",____________________X00020A___R0020A__U000R03000N99999999_020A__K000());
return 0;
}
$ g++ compileme.c -o temp
$ sed -b s/Z68/_20/g temp > valgrindme
$ chmod u+x valgrindme
$ ./valgrindme
Hello World!
$ valgrind --leak-check=yes ./valgrindme
..
$ gdb ./valgrindme
..
More information about the Gcc-bugs
mailing list