File 0130-2169514-check_malloc.patch of Package sblim-sfcb
Index: msgqueue.c
===================================================================
RCS file: /cvsroot/sblim/sfcb/msgqueue.c,v
retrieving revision 1.23
diff -u -p -r1.23 msgqueue.c
--- msgqueue.c 2 Oct 2008 21:34:59 -0000 1.23
+++ msgqueue.c 15 Oct 2008 21:04:29 -0000
@@ -290,6 +290,9 @@ static int spRcvMsg(int *s, int *from, v
if (*length) {
*data = malloc(spMsg.totalSize + 8);
+ if(*data == NULL) {
+ return spHandleError(s, em);
+ }
do {
if ((spGetMsg(s, NULL, *data, *length, mqg)) == -1)
return spHandleError(s, em);