From: Roland McGrath Date: Thu, 23 Jul 2009 18:37:59 +0000 (-0700) Subject: Merge branch 'master' of ssh://git.fedorahosted.org/git/elfutils into robustify X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b35f02aa430e890ffd3cd13bc6703971fe3d884;p=thirdparty%2Felfutils.git Merge branch 'master' of ssh://git.fedorahosted.org/git/elfutils into robustify Conflicts: libelf/elf32_getshdr.c --- 0b35f02aa430e890ffd3cd13bc6703971fe3d884 diff --cc libelf/elf32_getshdr.c index 5b206de9e,8d650d9f2..ac1458d51 --- a/libelf/elf32_getshdr.c +++ b/libelf/elf32_getshdr.c @@@ -1,5 -1,5 +1,5 @@@ /* Return section header. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2007, 2008 Red Hat, Inc. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2007, 2009 Red Hat, Inc. ++ Copyright (C) 1998-2009 Red Hat, Inc. This file is part of Red Hat elfutils. Written by Ulrich Drepper , 1998. @@@ -81,8 -81,7 +81,8 @@@ load_shdr_wrlock (Elf_Scn *scn goto out; size_t shnum; - if (__elf_getshnum_rdlock (elf, &shnum) != 0 - if (__elf_getshdrnum_rdlock (elf, &shnum) != 0) ++ if (__elf_getshdrnum_rdlock (elf, &shnum) != 0 + || shnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Shdr))) goto out; size_t size = shnum * sizeof (ElfW2(LIBELFBITS,Shdr));