Module Name: src
Committed By: christos
Date: Fri Feb 26 16:28:14 UTC 2016
Modified Files:
src/external/gpl3/gdb/dist/bfd: merge.c
Log Message:
CID 420802: Avoid NULL deref.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/gpl3/gdb/dist/bfd/merge.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gdb/dist/bfd/merge.c
diff -u src/external/gpl3/gdb/dist/bfd/merge.c:1.1.1.4 src/external/gpl3/gdb/dist/bfd/merge.c:1.2
--- src/external/gpl3/gdb/dist/bfd/merge.c:1.1.1.4 Tue Feb 2 22:00:11 2016
+++ src/external/gpl3/gdb/dist/bfd/merge.c Fri Feb 26 11:28:14 2016
@@ -334,7 +334,7 @@ sec_merge_emit (bfd *abfd, struct sec_me
/* Trailing alignment needed? */
off = sec->size - off;
- if (off != 0)
+ if (pad != NULL && off != 0)
{
if (contents)
memcpy (contents + offset, pad, off);