[PATCH] libbb: don't ignore result of xrealloc

Daniel Glöckner dg at emlix.com
Fri May 15 16:14:52 UTC 2009


On 05/15/2009 05:57 PM, Daniel Glöckner wrote:
> Even on single byte expansions the pointer may change.

Sorry, I didn't really read the surrounding code. It's actually trying to shrink
the memory block. According to glibc's info page realloc guarantees the same
address only if the size stays the same.

Anyway, on one of our systems using uClibc this bug caused lsmod to SIGSEGV.

  Daniel

-- 
Dipl.-Math. Daniel Glöckner, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax -11, Bahnhofsallee 1b, 37081 Göttingen, Germany
Geschäftsführung: Dr. Uwe Kracke, Dr. Cord Seele, Ust-IdNr.: DE 205 198 055
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160

emlix - your embedded linux partner


More information about the busybox mailing list