mirror of
https://github.com/curl/curl.git
synced 2026-06-08 06:24:16 +03:00
calloc
``` valgrind ERROR ==118247== Conditional jump or move depends on uninitialised value(s) ==118247== at 0x485400A: strpbrk (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==118247== by 0x15D9BC: Curl_get_pathname (curl_path.c:180) ==118247== by 0x126263: test_unit2604 (unit2604.c:85) ==118247== by 0x124905: main (first.c:281) ==118247== ==118247== Conditional jump or move depends on uninitialised value(s) ==118247== at 0x484F238: strlen (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==118247== by 0x15DB07: Curl_get_pathname (curl_path.c:182) ==118247== by 0x126263: test_unit2604 (unit2604.c:85) ==118247== by 0x124905: main (first.c:281) ==118247== ==118247== Conditional jump or move depends on uninitialised value(s) ==118247== at 0x4854136: strspn (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==118247== by 0x15D9D7: Curl_get_pathname (curl_path.c:185) ==118247== by 0x126263: test_unit2604 (unit2604.c:85) ==118247== by 0x124905: main (first.c:281) ==118247== ``` https://github.com/curl/curl/actions/runs/16693117599/job/47253533140?pr=18143#step:39:3585
This commit is contained in:
parent
2f1e3083ba
commit
b47bbf8363
1 changed files with 1 additions and 1 deletions
|
|
@ -75,7 +75,7 @@ static CURLcode test_unit2604(const char *arg)
|
|||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
char *cp0 = malloc(too_long + 1);
|
||||
char *cp0 = calloc(1, too_long + 1);
|
||||
abort_unless(cp0, "could not alloc too long value");
|
||||
memset(cp0, 'a', too_long);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue