aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2023-05-24 12:15:55 +0200
committerToni Uhlig <matzeton@googlemail.com>2023-05-24 12:38:55 +0200
commitb728fe0277d4ce3af791d88039e92746770c5664 (patch)
tree431f431d0507a5928d72f596901ecfc3fdc5dc83
parent1c82e0625f7d340e9f6335d1c9dfbab6e1d0688d (diff)
Fine tuned symbol check script.fix/invalid-ndpi-free
* added check for expected syms in modules Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r--src/lib/third_party/src/gcrypt/aesni.c2
-rwxr-xr-xutils/check_symbols.sh16
2 files changed, 16 insertions, 2 deletions
diff --git a/src/lib/third_party/src/gcrypt/aesni.c b/src/lib/third_party/src/gcrypt/aesni.c
index d1379de6f..ecce04fc5 100644
--- a/src/lib/third_party/src/gcrypt/aesni.c
+++ b/src/lib/third_party/src/gcrypt/aesni.c
@@ -97,7 +97,7 @@ int mbedtls_aesni_has_support( unsigned int what )
break; /* We giveup */
}
- free(line);
+ free(line); // Do not replace with ndpi_free(). See `man 3 getline`.
fclose(fd);
has_aesni_checked = 1;
diff --git a/utils/check_symbols.sh b/utils/check_symbols.sh
index 32f4fac89..5ab064c18 100755
--- a/utils/check_symbols.sh
+++ b/utils/check_symbols.sh
@@ -24,7 +24,21 @@ for line in `nm -P -u "${NDPI_LIB}"`; do
if [ ! -z "${FOUND_SYMBOL}" ]; then
SKIP=0
case "${CURRENT_OBJECT}" in
- '[ndpi_utils.o]'|'[ndpi_memory.o]'|'[roaring.o]') SKIP=1 ;;
+ '[roaring.o]')
+ case "${FOUND_SYMBOL}" in
+ 'malloc'|'calloc'|'realloc'|'free') SKIP=1 ;;
+ esac
+ ;;
+ '[ndpi_utils.o]'|'[ndpi_memory.o]'|'[roaring.o]')
+ case "${FOUND_SYMBOL}" in
+ 'malloc'|'calloc'|'free') SKIP=1 ;;
+ esac
+ ;;
+ '[gcrypt_light.o]')
+ case "${FOUND_SYMBOL}" in
+ 'free') SKIP=1 ;;
+ esac
+ ;;
esac
if [ ${SKIP} -eq 0 ]; then