Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/android-platform-libnativehelper-10.0.0+r36/ALog-priv.h Examining data/android-platform-libnativehelper-10.0.0+r36/JniConstants.cpp Examining data/android-platform-libnativehelper-10.0.0+r36/JniConstants.h Examining data/android-platform-libnativehelper-10.0.0+r36/JniInvocation.cpp Examining data/android-platform-libnativehelper-10.0.0+r36/header_only_include/nativehelper/nativehelper_utils.h Examining data/android-platform-libnativehelper-10.0.0+r36/header_only_include/nativehelper/scoped_bytes.h Examining data/android-platform-libnativehelper-10.0.0+r36/header_only_include/nativehelper/scoped_local_frame.h Examining data/android-platform-libnativehelper-10.0.0+r36/header_only_include/nativehelper/scoped_local_ref.h Examining data/android-platform-libnativehelper-10.0.0+r36/header_only_include/nativehelper/scoped_primitive_array.h Examining data/android-platform-libnativehelper-10.0.0+r36/header_only_include/nativehelper/scoped_string_chars.h Examining data/android-platform-libnativehelper-10.0.0+r36/header_only_include/nativehelper/scoped_utf_chars.h Examining data/android-platform-libnativehelper-10.0.0+r36/include/nativehelper/JNIHelp.h Examining data/android-platform-libnativehelper-10.0.0+r36/include/nativehelper/JniInvocation.h Examining data/android-platform-libnativehelper-10.0.0+r36/include/nativehelper/ScopedBytes.h Examining data/android-platform-libnativehelper-10.0.0+r36/include/nativehelper/ScopedLocalFrame.h Examining data/android-platform-libnativehelper-10.0.0+r36/include/nativehelper/ScopedLocalRef.h Examining data/android-platform-libnativehelper-10.0.0+r36/include/nativehelper/ScopedPrimitiveArray.h Examining data/android-platform-libnativehelper-10.0.0+r36/include/nativehelper/ScopedStringChars.h Examining data/android-platform-libnativehelper-10.0.0+r36/include/nativehelper/ScopedUtfChars.h Examining data/android-platform-libnativehelper-10.0.0+r36/include/nativehelper/module_api.h Examining data/android-platform-libnativehelper-10.0.0+r36/include/nativehelper/toStringArray.h Examining data/android-platform-libnativehelper-10.0.0+r36/include_jni/jni.h Examining data/android-platform-libnativehelper-10.0.0+r36/platform_include/nativehelper/detail/signature_checker.h Examining data/android-platform-libnativehelper-10.0.0+r36/platform_include/nativehelper/jni_macros.h Examining data/android-platform-libnativehelper-10.0.0+r36/tests/JniInvocation_test.cpp Examining data/android-platform-libnativehelper-10.0.0+r36/tests/JniSafeRegisterNativeMethods_test.cpp Examining data/android-platform-libnativehelper-10.0.0+r36/tests/jni_gtest/base/nativehelper/jni_gtest.h Examining data/android-platform-libnativehelper-10.0.0+r36/tests/libnativehelper_api_test.c Examining data/android-platform-libnativehelper-10.0.0+r36/toStringArray.cpp Examining data/android-platform-libnativehelper-10.0.0+r36/JNIHelp.cpp FINAL RESULTS: data/android-platform-libnativehelper-10.0.0+r36/JNIHelp.cpp:233:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(msgBuf, sizeof(msgBuf), fmt, args); data/android-platform-libnativehelper-10.0.0+r36/tests/JniInvocation_test.cpp:48:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buffer, kTestNonNull2); data/android-platform-libnativehelper-10.0.0+r36/JniInvocation.cpp:71:10: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. return LoadLibrary(filename); data/android-platform-libnativehelper-10.0.0+r36/JNIHelp.cpp:232:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msgBuf[512]; data/android-platform-libnativehelper-10.0.0+r36/JNIHelp.cpp:246:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[80]; data/android-platform-libnativehelper-10.0.0+r36/JniInvocation.cpp:46:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char debuggable[PROP_VALUE_MAX] = {0}; data/android-platform-libnativehelper-10.0.0+r36/JniInvocation.cpp:214:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[PROP_VALUE_MAX]; data/android-platform-libnativehelper-10.0.0+r36/tests/JniInvocation_test.cpp:52:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[PROPERTY_VALUE_MAX]; data/android-platform-libnativehelper-10.0.0+r36/tests/JniInvocation_test.cpp:77:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[PROPERTY_VALUE_MAX]; data/android-platform-libnativehelper-10.0.0+r36/header_only_include/nativehelper/scoped_utf_chars.h:79:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(utf_chars_); ANALYSIS SUMMARY: Hits = 10 Lines analyzed = 6826 in approximately 0.19 seconds (36610 lines/second) Physical Source Lines of Code (SLOC) = 4422 Hits@level = [0] 1 [1] 1 [2] 6 [3] 1 [4] 2 [5] 0 Hits@level+ = [0+] 11 [1+] 10 [2+] 9 [3+] 3 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 2.48756 [1+] 2.26142 [2+] 2.03528 [3+] 0.678426 [4+] 0.452284 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.