aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/busybox/patches/700-hexdump_segfault_fix.patch
blob: ab09fb3e42c7b26826a2298c47a8888dca548296 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- 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;