Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1
ghostscript-library
ghostscript-8.62-bnc559122.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ghostscript-8.62-bnc559122.patch of Package ghostscript-library
--- src/gsmisc.c +++ src/gsmisc.c 2009-11-24 17:16:39.000000000 +0000 @@ -70,10 +70,10 @@ int outprintf(const gs_memory_t *mem, co va_start(args, fmt); - count = vsprintf(buf, fmt, args); + count = vsnprintf(buf, sizeof (buf), fmt, args); outwrite(mem, buf, count); - if (count >= PRINTF_BUF_LENGTH) { - count = sprintf(buf, + if (count == -1 || count >= sizeof (buf)) { + count = snprintf(buf, sizeof (buf), "PANIC: printf exceeded %d bytes. Stack has been corrupted.\n", PRINTF_BUF_LENGTH); outwrite(mem, buf, count); @@ -90,10 +90,10 @@ int errprintf(const char *fmt, ...) va_start(args, fmt); - count = vsprintf(buf, fmt, args); + count = vsnprintf(buf, sizeof (buf), fmt, args); errwrite(buf, count); - if (count >= PRINTF_BUF_LENGTH) { - count = sprintf(buf, + if (count == -1 || count >= sizeof (buf)) { + count = snprintf(buf, sizeof (buf), "PANIC: printf exceeded %d bytes. Stack has been corrupted.\n", PRINTF_BUF_LENGTH); errwrite(buf, count); @@ -237,7 +237,7 @@ int gs_throw_imp(const char *func, const va_list ap; va_start(ap, fmt); - vsprintf(msg, fmt, ap); + vsnprintf(msg, sizeof (msg), fmt, ap); msg[sizeof(msg) - 1] = 0; va_end(ap); --- src/gxttfb.c +++ src/gxttfb.c 2009-11-24 17:16:39.000000000 +0000 @@ -237,7 +237,7 @@ static int DebugPrint(ttfFont *ttf, cons if (gs_debug_c('Y')) { va_start(args, fmt); - count = vsprintf(buf, fmt, args); + count = vsnprintf(buf, sizeof (buf), fmt, args); /* NB: moved debug output from stdout to stderr */ errwrite(buf, count); --- src/rinkj/rinkj-byte-stream.c +++ src/rinkj/rinkj-byte-stream.c 2009-11-24 17:16:39.000000000 +0000 @@ -42,7 +42,7 @@ rinkj_byte_stream_printf (RinkjByteStrea va_list ap; va_start (ap, fmt); - len = vsprintf (str, fmt, ap); + len = vsnprintf (str, sizeof (str), fmt, ap); va_end (ap); return rinkj_byte_stream_write (bs, str, len); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor