torsocks: fix tagged pointer aborts/segfaults on some Android 11 devices. (#8187)
This commit is contained in:
parent
48f65b6aa1
commit
c53780c5bb
27
packages/torsocks/04_tagged_pointer_fixes.patch
Normal file
27
packages/torsocks/04_tagged_pointer_fixes.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff --git a/src/common/onion.c b/src/common/onion.c
|
||||
index 6a61d83..05d21fc 100644
|
||||
--- a/src/common/onion.c
|
||||
+++ b/src/common/onion.c
|
||||
@@ -151,7 +151,7 @@ void onion_pool_destroy(struct onion_pool *pool)
|
||||
onion_entry_destroy(pool->entries[i]);
|
||||
}
|
||||
|
||||
- free(pool->entries);
|
||||
+ free(*(struct onion_entry **)pool->entries);
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/src/lib/torsocks.c b/src/lib/torsocks.c
|
||||
index 16f2da0..2b991c7 100644
|
||||
--- a/src/lib/torsocks.c
|
||||
+++ b/src/lib/torsocks.c
|
||||
@@ -348,7 +348,8 @@ static void tsocks_exit(void)
|
||||
/* Cleanup every entries in the onion pool. */
|
||||
onion_pool_destroy(&tsocks_onion_pool);
|
||||
/* Cleanup allocated memory in the config file. */
|
||||
- config_file_destroy(&tsocks_config.conf_file);
|
||||
+ /* This triggers a tagged pointer truncation error/sigabrt on Android 11. */
|
||||
+ /* config_file_destroy(&tsocks_config.conf_file); */
|
||||
/* Clean up logging. */
|
||||
log_destroy();
|
||||
}
|
@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Wrapper to safely torify applications"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=2.3.0
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=https://github.com/dgoulet/torsocks/archive/v$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=817c143e8a9d217f41a223a85139c6ca28e1b99556c547fcdb4c72dbc170b6c9
|
||||
TERMUX_PKG_DEPENDS="tor"
|
||||
|
Loading…
Reference in New Issue
Block a user