busybox: fix segfault in 'ftpd'
Fixes https://github.com/termux/termux-packages/issues/2740
This commit is contained in:
parent
cf05d22c41
commit
f465b98b47
|
@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://busybox.net/
|
|||
TERMUX_PKG_DESCRIPTION="Tiny versions of many common UNIX utilities into a single small executable"
|
||||
TERMUX_PKG_ESSENTIAL=yes
|
||||
TERMUX_PKG_VERSION=1.29.2
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SHA256=67d2fa6e147a45875fe972de62d907ef866fe784c495c363bf34756c444a5d61
|
||||
TERMUX_PKG_SRCURL=https://busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
diff -uNr busybox-1.29.2/networking/ftpd.c busybox-1.29.2.mod/networking/ftpd.c
|
||||
--- busybox-1.29.2/networking/ftpd.c 2018-07-02 14:23:06.000000000 +0300
|
||||
+++ busybox-1.29.2.mod/networking/ftpd.c 2018-08-15 12:04:36.418874958 +0300
|
||||
@@ -177,13 +177,9 @@
|
||||
char msg_ok [(sizeof("NNN " MSG_OK ) + 3) & 0xfffc];
|
||||
char msg_err[(sizeof("NNN " MSG_ERR) + 3) & 0xfffc];
|
||||
} FIX_ALIASING;
|
||||
-#define G (*ptr_to_globals)
|
||||
-/* ^^^ about 75 bytes smaller code than this: */
|
||||
-//#define G (*(struct globals*)bb_common_bufsiz1)
|
||||
+#define G (*(struct globals*)bb_common_bufsiz1)
|
||||
#define INIT_G() do { \
|
||||
- SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
|
||||
- /*setup_common_bufsiz();*/ \
|
||||
- \
|
||||
+ setup_common_bufsiz(); \
|
||||
/* Moved to main */ \
|
||||
/*strcpy(G.msg_ok + 4, MSG_OK );*/ \
|
||||
/*strcpy(G.msg_err + 4, MSG_ERR);*/ \
|
Loading…
Reference in New Issue