1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-05 09:45:21 +02:00
openwrt-xburst/package/busybox/patches/700-hexdump_segfault_fix.patch
jow 23bd1bd8c7 [package] busybox: fix hexdump segmentation fault with an empty leading format unit
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29156 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-15 17:38:55 +00:00

12 lines
309 B
Diff

--- a/libbb/dump.c
+++ b/libbb/dump.c
@@ -301,7 +301,7 @@ static NOINLINE void rewrite(priv_dumper
) {
fu->reps += (dumper->blocksize - fs->bcnt) / fu->bcnt;
}
- if (fu->reps > 1) {
+ if (fu->reps > 1 && fu->nextpr) {
for (pr = fu->nextpr;; pr = pr->nextpr)
if (!pr->nextpr)
break;