Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
DISCONTINUED:openSUSE:11.2
librtas
librtas.open_prop_file-off_by_one.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File librtas.open_prop_file-off_by_one.patch of Package librtas
alloc the trailing nul as well. --- librtas_src/ofdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: librtas-1.2.4/librtas_src/ofdt.c =================================================================== --- librtas-1.2.4.orig/librtas_src/ofdt.c +++ librtas-1.2.4/librtas_src/ofdt.c @@ -31,14 +31,14 @@ static int open_prop_file(const char *pr char *path; int len; - len = strlen(prop_path) + strlen(prop_name) + 1; + len = strlen(prop_path) + strlen(prop_name) + 1 + 1; path = malloc(len); if (path == NULL) { errno = ENOMEM; return -1; } - sprintf(path, "%s/%s", prop_path, prop_name); + snprintf(path, len, "%s/%s", prop_path, prop_name); *fd = open(path, O_RDONLY); free(path);
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