This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/19664] New: Calls to malloc() not checked for return value of NULL
- From: "wp02855 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 18 Feb 2016 20:59:15 +0000
- Subject: [Bug libc/19664] New: Calls to malloc() not checked for return value of NULL
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=19664
Bug ID: 19664
Summary: Calls to malloc() not checked for return value of NULL
Product: glibc
Version: 2.22
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: wp02855 at gmail dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Created attachment 9002
--> https://sourceware.org/bugzilla/attachment.cgi?id=9002&action=edit
patch file for above bug report (diff -u)
In directory 'glibc-2.22/sysdeps/generic', file 'unwind-dw2-fde.c',
there are some calls to malloc() which are not checked for a return
value of NULL, indicating failure.
The patch file below should address/correct this issue:
--- unwind-dw2-fde.c.orig 2016-02-18 08:54:43.952666136 -0800
+++ unwind-dw2-fde.c 2016-02-18 08:56:01.886571135 -0800
@@ -143,6 +143,8 @@
return;
ob = (struct object *) malloc (sizeof (struct object));
+ if (ob == NULL)
+ return;
__register_frame_info_bases (begin, ob, 0, 0);
}
@@ -182,6 +184,8 @@
__register_frame_table (void *begin)
{
struct object *ob = (struct object *) malloc (sizeof (struct object));
+ if (ob == NULL)
+ return;
__register_frame_info_table_bases (begin, ob, 0, 0);
}
--
You are receiving this mail because:
You are on the CC list for the bug.