Mageia Bugzilla – Attachment 8696 Details for
Bug 19840
icu new security issues CVE-2014-9911 and CVE-2016-7415
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Trivial test case for the overflow vulnerability
funicu.c (text/plain), 775 bytes, created by
Len Lawrence
on 2016-11-26 00:30:03 CET
(
hide
)
Description:
Trivial test case for the overflow vulnerability
Filename:
MIME Type:
Creator:
Len Lawrence
Created:
2016-11-26 00:30:03 CET
Size:
775 bytes
patch
obsolete
>// http://bugs.icu-project.org/trac/ticket/10891 > >#include "stdlib.h" >#include "memory.h" > >#include "unicode/utypes.h" >#include "unicode/uenum.h" >#define RESLEN 512 > >// COMPILE WITH: >// gcc -o funicu funicu.c `pkg-config --libs --cflags icu-uc icu-i18n icu-le icu-lx icu-io` > >int main(void) >{ > char locale[512]; > UChar *result; > UErrorCode *err; > int32_t rc; > int i; > > result = malloc(RESLEN); > err = malloc(sizeof(UErrorCode)); > memset(locale, '*', sizeof(locale)); > locale[ sizeof(locale)-1 ] = '\x00'; > > rc = uloc_getDisplayName( locale, // const localeID > "en_US", // const inLocaleID > result, // result > RESLEN, // maxresultSize > err > ); > > return 0; >} >
// http://bugs.icu-project.org/trac/ticket/10891 #include "stdlib.h" #include "memory.h" #include "unicode/utypes.h" #include "unicode/uenum.h" #define RESLEN 512 // COMPILE WITH: // gcc -o funicu funicu.c `pkg-config --libs --cflags icu-uc icu-i18n icu-le icu-lx icu-io` int main(void) { char locale[512]; UChar *result; UErrorCode *err; int32_t rc; int i; result = malloc(RESLEN); err = malloc(sizeof(UErrorCode)); memset(locale, '*', sizeof(locale)); locale[ sizeof(locale)-1 ] = '\x00'; rc = uloc_getDisplayName( locale, // const localeID "en_US", // const inLocaleID result, // result RESLEN, // maxresultSize err ); return 0; }
View Attachment As Raw
Actions:
View
Attachments on
bug 19840
: 8696