summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-11-15 17:38:55 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-11-15 17:38:55 +0000
commitd0f5b51a8bd49c00d88d5ad0aa62bae322cec800 (patch)
tree67ae7a8a19d6123e147502e605835ad05a049acc
parent817c72ef02d9c16b3a0021404aa9c6781382b74e (diff)
downloadmtk-20170518-d0f5b51a8bd49c00d88d5ad0aa62bae322cec800.zip
mtk-20170518-d0f5b51a8bd49c00d88d5ad0aa62bae322cec800.tar.gz
mtk-20170518-d0f5b51a8bd49c00d88d5ad0aa62bae322cec800.tar.bz2
busybox: fix hexdump segmentation fault with an empty leading format unit
SVN-Revision: 29156
-rw-r--r--package/busybox/Makefile4
-rw-r--r--package/busybox/patches/700-hexdump_segfault_fix.patch11
2 files changed, 14 insertions, 1 deletions
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index 967fa75..7989345 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=busybox
PKG_VERSION:=1.19.3
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_FLAGS:=essential
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -72,6 +72,8 @@ ifdef CONFIG_BUSYBOX_USE_LIBRPC
LDLIBS += rpc
endif
+TARGET_CFLAGS += -ggdb3
+
define Build/Compile
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
diff --git a/package/busybox/patches/700-hexdump_segfault_fix.patch b/package/busybox/patches/700-hexdump_segfault_fix.patch
new file mode 100644
index 0000000..ab09fb3
--- /dev/null
+++ b/package/busybox/patches/700-hexdump_segfault_fix.patch
@@ -0,0 +1,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;