Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2
arptables
arptables_jf-0.0.8-fclose.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File arptables_jf-0.0.8-fclose.patch of Package arptables
--- arptables_jf-0.0.8/arptables-restore.c +++ arptables_jf-0.0.8/arptables-restore.c 2009/09/07 11:06:26 @@ -140,7 +140,7 @@ int main(int argc, char *argv[]) } if (optind == argc - 1) { - in = fopen(argv[optind], "r"); + in = fopen(argv[optind], "re"); if (!in) { fprintf(stderr, "Can't open %s: %s", argv[optind], strerror(errno)); --- arptables_jf-0.0.8/arptables-save.c +++ arptables_jf-0.0.8/arptables-save.c 2009/09/07 11:05:47 @@ -241,13 +241,16 @@ static int for_each_table(int (*func)(co while (fgets(tablename, sizeof(tablename), procfile)) { - if (tablename[strlen(tablename) - 1] != '\n') + if (tablename[strlen(tablename) - 1] != '\n') { + fclose(procfile); exit_error(OTHER_PROBLEM, "Badly formed tablename `%s'\n", tablename); + } tablename[strlen(tablename) - 1] = '\0'; ret &= func(tablename); } + fclose(procfile); return ret; }
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