]> code.ossystems Code Review - openembedded-core.git/commit
opkg: Protect add-exclude.patch from malloc failure
authorPaul Barker <paul@paulbarker.me.uk>
Thu, 14 Aug 2014 16:46:51 +0000 (16:46 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 15 Aug 2014 17:19:52 +0000 (18:19 +0100)
commit64048d45d5c52d354396e357e765f0fd8b5e56fd
treee5bf7645d3fbc849c1908bea1e26edbdb342ed46
parent513f72274460e54fd35dda5ef70fa42ba2b284f8
opkg: Protect add-exclude.patch from malloc failure

In the code added by add-exclude.patch, the return values of malloc and realloc
were not checked before being dereferenced.

In opkg we can use xmalloc and xrealloc instead of malloc and realloc. These
functions terminate the program instead of returning NULL if memory allocation
fails.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/opkg/opkg/add-exclude.patch