[package] busybox: avoid infinite loop in lsmod (#4834)
[openwrt/svn-archive/archive.git] / package / busybox / patches / 810-lsmod-infinite-loop.patch
1 --- a/modutils/lsmod.c
2 +++ b/modutils/lsmod.c
3 @@ -107,7 +107,7 @@
4 continue;
5 } else if (errno != ENOSPC)
6 bb_perror_msg_and_die("module %s: QM_REFS", mn);
7 - deps = xrealloc(deps, count);
8 + deps = xrealloc(deps, depsize = count);
9 }
10 printf("%-20s%8lu%4ld", mn, info.size, info.usecount);
11 if (info.flags & NEW_MOD_DELETED)