Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/binutils/usr.sbin/dbsym Allocate enough memory.
details: https://anonhg.NetBSD.org/src/rev/e3ed47cd1dea
branches: trunk
changeset: 355064:e3ed47cd1dea
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Jul 11 21:19:42 2017 +0000
description:
Allocate enough memory.
diffstat:
external/gpl3/binutils/usr.sbin/dbsym/dbsym.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r ded426e4fcd6 -r e3ed47cd1dea external/gpl3/binutils/usr.sbin/dbsym/dbsym.c
--- a/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c Tue Jul 11 20:42:17 2017 +0000
+++ b/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c Tue Jul 11 21:19:42 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dbsym.c,v 1.5 2017/07/06 02:34:00 chs Exp $ */
+/* $NetBSD: dbsym.c,v 1.6 2017/07/11 21:19:42 joerg Exp $ */
/*
* Copyright (c) 2001 Simon Burge (for Wasabi Systems)
@@ -39,7 +39,7 @@
__COPYRIGHT("@(#) Copyright (c) 1996 Christopher G. Demetriou.\
Copyright 2001 Simon Burge.\
All rights reserved.");
-__RCSID("$NetBSD: dbsym.c,v 1.5 2017/07/06 02:34:00 chs Exp $");
+__RCSID("$NetBSD: dbsym.c,v 1.6 2017/07/11 21:19:42 joerg Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -426,7 +426,7 @@
shstridx = (ISELF64
? bfd_get_16(abfd, e64_hdr.e_shstrndx)
: bfd_get_16(abfd, e32_hdr.e_shstrndx));
- shstrtab = malloc(shstridx);
+ shstrtab = malloc(SH_SIZE(shstridx));
if (shstrtab == NULL)
goto out;
if (pread(fd, shstrtab, SH_SIZE(shstridx), SH_OFFSET(shstridx)) !=
Home |
Main Index |
Thread Index |
Old Index