Projects
Eulaceura:Factory
compface
_service:obs_scm:compface-1.5.2-stack-smashing....
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:compface-1.5.2-stack-smashing.patch of Package compface
Prevent sscanf stack smashing, and fix two GCC warnings. diff -Nur compface-1.5.2-prepped/file.c compface-1.5.2-modified/file.c --- compface-1.5.2-prepped/file.c 2006-08-04 18:58:17.000000000 +0200 +++ compface-1.5.2-modified/file.c 2006-08-04 18:59:30.000000000 +0200 @@ -80,7 +80,7 @@ static char table_inv[] = { 0,8,4,12,2,10,6,14,1,9, 5,13, 3,11, 7,15 }; static char table_nop[] = { 0,1,2, 3,4, 5,6, 7,8,9,10,11,12,13,14,15 }; char *table = table_nop; /* optionally invert bits in nibble */ - register inc = 0; /* optionally swap nimmles */ + register int inc = 0; /* optionally swap nimmles */ int bits; t = s = fbuf; @@ -91,9 +91,9 @@ char type1[128]; char type2[128]; while (*s && *s++ != '\n'); - if (sscanf(s, "#define %*s %d", &bits) == 1) if (bits == 48) { + if ((sscanf(s, "#define %*s %d", &bits) == 1) && (bits == 48)) { while (*s && *s++ != '\n'); - if (sscanf(s, "static %s %s", type1,type2)==2 && + if (sscanf(s, "static %127s %127s", type1,type2)==2 && (!strcmp(type1, "char") || !strcmp(type2, "char"))) { while (*s && *s++ != '\n');
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2