Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238231 - sys-apps/sandbox-1.2.20_alpha2-r1 discards return value of realloc
Summary: sys-apps/sandbox-1.2.20_alpha2-r1 discards return value of realloc
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-20 21:37 UTC by David Leverton
Modified: 2008-11-08 14:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
sandbox-1.2.20_alpha2-realloc.patch (sandbox-1.2.20_alpha2-realloc.patch,355 bytes, patch)
2008-09-20 21:37 UTC, David Leverton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Leverton 2008-09-20 21:37:07 UTC
Line 644 of src/sandbox.c calls xrealloc and tests the return value for NULL, but if it is non-NULL the new value is discarded.  If it is in fact different from the value that was passed in, the code will write into the old, now-invalid memory area and cause arbitrary errors, crashes, etc.
Comment 1 David Leverton 2008-09-20 21:37:43 UTC
Created attachment 165946 [details, diff]
sandbox-1.2.20_alpha2-realloc.patch

Fix.
Comment 2 SpanKY gentoo-dev 2008-11-08 14:43:47 UTC
thanks, ive committed your fix to svn