busybox: avoid infinite loop in lsmod (#4834)

SVN-Revision: 15071
This commit is contained in:
Jo-Philipp Wich 2009-03-29 20:26:45 +00:00
parent 21028447f2
commit 0180abdf49
2 changed files with 12 additions and 1 deletions

View File

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=busybox
PKG_VERSION:=1.11.3
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.busybox.net/downloads \

View File

@ -0,0 +1,11 @@
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -107,7 +107,7 @@
continue;
} else if (errno != ENOSPC)
bb_perror_msg_and_die("module %s: QM_REFS", mn);
- deps = xrealloc(deps, count);
+ deps = xrealloc(deps, depsize = count);
}
printf("%-20s%8lu%4ld", mn, info.size, info.usecount);
if (info.flags & NEW_MOD_DELETED)