Mageia Bugzilla – Attachment 9686 Details for
Bug 21659
libgd new security issue CVE-2017-6362
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Script to load a file into memory and try to free it twice.
doublefree.c (text/plain), 472 bytes, created by
Len Lawrence
on 2017-09-24 21:41:30 CEST
(
hide
)
Description:
Script to load a file into memory and try to free it twice.
Filename:
MIME Type:
Creator:
Len Lawrence
Created:
2017-09-24 21:41:30 CEST
Size:
472 bytes
patch
obsolete
>#include "stdlib.h" >#include "gd.h" >//#include "gdtest.h" > >int main(int argc, char * argv[]) >{ > gdImagePtr im = 0; > FILE *fp = 0; > void * im2 = 0; > int size = 0; > > if (argc != 2) return -1; > > fp = fopen(argv[1], "rb"); > if (fp){ > im = gdImageCreateFromGd(fp); > > if (im){ > im2 = gdImagePngPtr(im, &size); > > if (im2){ > gdFree(im2); > } > gdImageDestroy(im); > } > > } > > fclose(fp); > >// return gdNumFailures(); >}
#include "stdlib.h" #include "gd.h" //#include "gdtest.h" int main(int argc, char * argv[]) { gdImagePtr im = 0; FILE *fp = 0; void * im2 = 0; int size = 0; if (argc != 2) return -1; fp = fopen(argv[1], "rb"); if (fp){ im = gdImageCreateFromGd(fp); if (im){ im2 = gdImagePngPtr(im, &size); if (im2){ gdFree(im2); } gdImageDestroy(im); } } fclose(fp); // return gdNumFailures(); }
View Attachment As Raw
Actions:
View
Attachments on
bug 21659
:
9685
| 9686 |
9687