proxychains: handle cases when LD_PRELOAD string is long

Proxychains has temp buffer for LD_PRELOAD with size of 256
characters which may not be enough for cases when that environment
variable already contains several lib paths.

Issue: https://github.com/termux/x11-packages/issues/186
This commit is contained in:
Leonid Pliushch 2019-12-13 20:44:02 +02:00
parent fa328d0018
commit e649a0ae98
2 changed files with 15 additions and 0 deletions

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="A hook preloader that allows to redirect TCP traffic of
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
TERMUX_PKG_VERSION=4.14
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/rofl0r/proxychains-ng/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=ab31626af7177cc2669433bb244b99a8f98c08031498233bb3df3bcc9711a9cc
TERMUX_PKG_BUILD_IN_SRC=true

View File

@ -0,0 +1,14 @@
diff -uNr proxychains-ng-4.14/src/main.c proxychains-ng-4.14.mod/src/main.c
--- proxychains-ng-4.14/src/main.c 2019-03-17 01:04:10.000000000 +0200
+++ proxychains-ng-4.14.mod/src/main.c 2019-12-13 20:38:27.768235332 +0200
@@ -65,8 +65,8 @@
int main(int argc, char *argv[]) {
char *path = NULL;
- char buf[256];
- char pbuf[256];
+ char buf[PATH_MAX];
+ char pbuf[PATH_MAX];
int start_argv = 1;
int quiet = 0;
size_t i;