Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2:Rings:1-MinimalX
libcap1
libcap-invalid-free-fix.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libcap-invalid-free-fix.diff of Package libcap1
Index: progs/getpcaps.c =================================================================== --- progs/getpcaps.c.orig +++ progs/getpcaps.c @@ -52,9 +52,11 @@ int main(int argc, char **argv) continue; } else { char *result = cap_to_text(cap_d, &length); - fprintf(stderr, "Capabilities for `%s': %s\n", *argv, result); - cap_free(result); - result = NULL; + if (result) { + fprintf(stderr, "Capabilities for `%s': %s\n", *argv, result); + cap_free(result); + result = NULL; + } } } Index: progs/setpcaps.c =================================================================== --- progs/setpcaps.c.orig +++ progs/setpcaps.c @@ -98,9 +98,11 @@ int main(int argc, char **argv) char *result; result = cap_to_text(cap_d, &length); - fprintf(stderr, "[caps set to:\n%s\n]\n", result); - cap_free(result); - result = NULL; + if (result) { + fprintf(stderr, "[caps set to:\n%s\n]\n", result); + cap_free(result); + result = NULL; + } } #endif
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