Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/bfd CID 420802: Avoid NULL deref.



details:   https://anonhg.NetBSD.org/src/rev/ab1d1fa6aa69
branches:  trunk
changeset: 343773:ab1d1fa6aa69
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Feb 26 16:28:14 2016 +0000

description:
CID 420802: Avoid NULL deref.

diffstat:

 external/gpl3/gdb/dist/bfd/merge.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 28ea33afeb2c -r ab1d1fa6aa69 external/gpl3/gdb/dist/bfd/merge.c
--- a/external/gpl3/gdb/dist/bfd/merge.c        Fri Feb 26 16:26:24 2016 +0000
+++ b/external/gpl3/gdb/dist/bfd/merge.c        Fri Feb 26 16:28:14 2016 +0000
@@ -334,7 +334,7 @@
 
   /* Trailing alignment needed?  */
   off = sec->size - off;
-  if (off != 0)
+  if (pad != NULL && off != 0)
     {
       if (contents)
        memcpy (contents + offset, pad, off);



Home | Main Index | Thread Index | Old Index