Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:verhaegs:support
lha
lha-1.14i-dir_length_bounds_check.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lha-1.14i-dir_length_bounds_check.patch of Package lha
--- lha-114i.orig/src/header.c 2002-07-19 17:23:58.000000000 +0900 +++ lha-114i/src/header.c 2004-06-16 09:49:23.000000000 +0900 @@ -648,8 +648,17 @@ } if (dir_length) { + if ((dir_length + name_length) > sizeof(dirname)) { + fprintf(stderr, "Insufficient buffer size\n"); + exit(112); + } strcat(dirname, hdr->name); - strcpy(hdr->name, dirname); + + if ((dir_length + name_length) > sizeof(hdr->name)) { + fprintf(stderr, "Insufficient buffer size\n"); + exit(112); + } + strncpy(hdr->name, dirname, sizeof(hdr->name)); name_length += dir_length; }
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