Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2
thttpd
thttpd-2.25b-overflow.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File thttpd-2.25b-overflow.diff of Package thttpd
--- extras/htpasswd.c +++ extras/htpasswd.c @@ -186,15 +186,16 @@ fprintf(stderr,"Use -c option to create new one.\n"); exit(1); } - strcpy(user,argv[2]); - + strncpy(user,argv[2],MAX_STRING_LEN); + user[MAX_STRING_LEN-1]='\0'; found = 0; while(!(getline(line,MAX_STRING_LEN,f))) { if(found || (line[0] == '#') || (!line[0])) { putline(tfp,line); continue; } - strcpy(l,line); + strncpy(l,line,MAX_STRING_LEN); + l[MAX_STRING_LEN-1]='\0'; getword(w,l,':'); if(strcmp(user,w)) { putline(tfp,line); @@ -212,7 +213,8 @@ } fclose(f); fclose(tfp); - sprintf(command,"cp %s %s",temp_template,argv[1]); + snprintf(command,MAX_STRING_LEN,"cp %s %s",temp_template,argv[1]); + command[MAX_STRING_LEN-1]='\0'; system(command); unlink(temp_template); exit(0);
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