Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:redwil:15.4
logsurfer+
logsurfer-double-free-fix.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File logsurfer-double-free-fix.diff of Package logsurfer+
diff --git a/src/exec.c b/src/exec.c index 5c282a9..6c60c3c 100644 --- a/src/exec.c +++ b/src/exec.c @@ -87,11 +87,15 @@ prepare_exec(cmdstring) while ( (new_argc < 255) && ((new_argv[new_argc++]=get_word(&src)) != NULL) ) ; regex_submatches_num=old_matchnum; - if ( (new_argc == 255) || (*(skip_spaces(src)) != '\0') ) + if ( (new_argc == 255) || (*(skip_spaces(src)) != '\0') ){ + new_argc--; return(0); - if ( (new_argv[new_argc]=(char *)malloc(sizeof(char))) == NULL ) - return(0); - *new_argv[new_argc]='\0'; + } + if ( (new_argv[new_argc]=(char *)malloc(sizeof(char))) == NULL ){ + new_argc--; + return(0); + } + *new_argv[new_argc]='\0'; return(1); }
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