Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:GA
xli
xli-1.17.0-overflow.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xli-1.17.0-overflow.patch of Package xli
Index: ddxli.h =================================================================== --- ddxli.h.orig +++ ddxli.h @@ -36,11 +36,13 @@ /* equate bcopy with memcpy and bzero with memset where appropriate. */ #ifdef HAS_MEMCPY +#ifndef __linux__ #ifndef bcopy #define bcopy(S,D,N) memcpy((char *)(D),(char *)(S),(N)) #endif #ifndef bzero #define bzero(P,N) memset((P),'\0',(N)) +#endif /* __linux__ */ #endif #ifndef bfill #define bfill(P,N,C) memset((P),(C),(N)) Index: faces.c =================================================================== --- faces.c.orig +++ faces.c @@ -56,9 +56,15 @@ isFaces(ZFILE *zf, char *name, char *fna if (! strcmp(buf, "\n")) break; if (!strncmp(buf, "FirstName:", 10)) - strcpy(fname, buf + 11); + { + strncpy(fname, buf + 11, BUFSIZ - 1); + fname[BUFSIZ - 1] = '\0'; + } else if (!strncmp(buf, "LastName:", 9)) - strcpy(lname, buf + 10); + { + strncpy(lname, buf + 10, BUFSIZ - 1); + lname[BUFSIZ - 1] = '\0'; + } else if (!strncmp(buf, "Image:", 6)) { if (sscanf(buf + 7, "%d%d%d", &iw, &ih, &id) != 3) { fprintf(stderr,"facesLoad: %s - Bad image\n", name); Index: reduce.c =================================================================== --- reduce.c.orig +++ reduce.c @@ -178,7 +178,8 @@ Image *reduce(Image *image, unsigned col /* get destination image */ depth = colorsToDepth(OutColors); new_image = newRGBImage(image->width, image->height, depth); - sprintf(buf, "%s (%d colors)", image->title, OutColors); + snprintf(buf, BUFSIZ, "%s (%d colors)", image->title, OutColors); + buf[BUFSIZ-1] = '\0'; new_image->title = dupString(buf); new_image->gamma = image->gamma; Index: zoom.c =================================================================== --- zoom.c.orig +++ zoom.c @@ -52,28 +52,29 @@ Image *zoom(Image *oimage, unsigned int if (verbose) printf(" Zooming image Y axis by %d%%...", yzoom); if (changetitle) - sprintf(buf, "%s (Y zoom %d%%)", oimage->title, yzoom); + snprintf(buf, BUFSIZ, "%s (Y zoom %d%%)", oimage->title, yzoom); } else if (!yzoom) { if (verbose) printf(" Zooming image X axis by %d%%...", xzoom); if (changetitle) - sprintf(buf, "%s (X zoom %d%%)", oimage->title, xzoom); + snprintf(buf, BUFSIZ, "%s (X zoom %d%%)", oimage->title, xzoom); } else if (xzoom == yzoom) { if (verbose) printf(" Zooming image by %d%%...", xzoom); if (changetitle) - sprintf(buf, "%s (%d%% zoom)", oimage->title, xzoom); + snprintf(buf, BUFSIZ, "%s (%d%% zoom)", oimage->title, xzoom); } else { if (verbose) printf(" Zooming image X axis by %d%% and Y axis by %d%%...", xzoom, yzoom); if (changetitle) - sprintf(buf, "%s (X zoom %d%% Y zoom %d%%)", oimage->title, + snprintf(buf, BUFSIZ, "%s (X zoom %d%% Y zoom %d%%)", oimage->title, xzoom, yzoom); } + buf[BUFSIZ-1] = '\0'; if (!changetitle) strcpy(buf,oimage->title);
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