Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
isv:perlur:epel
libmikmod
libmikmod-malloc-fail.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libmikmod-malloc-fail.patch of Package libmikmod
Some partially corrupt mod files cause mikmod to try and allocate lots of memory, this is ok, because failure to do so is being handled. But the new libmikmod malloc code align_pointer function did not handle asking to align the NULL pointer, resulting from the too big alloc, causing a segfault, this patch fixes this. diff -up libmikmod-3.2.0/mmio/mmalloc.c~ libmikmod-3.2.0/mmio/mmalloc.c --- libmikmod-3.2.0/mmio/mmalloc.c~ 2012-03-14 18:02:59.000000000 +0100 +++ libmikmod-3.2.0/mmio/mmalloc.c 2012-09-08 17:23:36.528824523 +0200 @@ -38,6 +38,10 @@ static void * align_pointer(char *ptr, s { char *pptr = ptr + sizeof(void*); char *fptr; + + if (ptr == NULL) + return NULL; + size_t err = ((size_t)pptr)&(stride-1); if (err) fptr = pptr + (stride - err);
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