Parent: 377f2ec0721f3ad210060b156f960c46e561e5f9
Author: Bastien Nocera <hadess@hadess.net>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-05-16 23:38:15
Tree: 47a26664a5edda7331822917ebc6184cb18573d8
android/handsfree: Check sprintf retval Error: SNYK_CODE_WARNING (CWE-125): [#def62] [important] android/handsfree.c:1247:15: error[cpp/NegativeIndex]: The value from sprintf, a standard library function that can return a negative value is used as an index. A negative array index can lead to reading or writing outside the bounds of the array. Ensure the value of the index used is within bounds before use. 1245| buf = g_malloc(len); 1246| 1247|-> ptr = buf + sprintf(buf, "+CIND:"); 1248| 1249| for (i = 0; i < IND_COUNT; i++) {
Diffstat
| M | android/handsfree.c | | | 14 | +++++++++++- - - |
1 files changed, 11 insertions(+), 3 deletions(-)