]>
git.ipfire.org Git - thirdparty/suricata.git/commit
lua/flowvarlib: check malloc result
src/util-lua-flowvarlib.c:110:12: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory]
memcpy(buf, value, len);
^
src/util-lua-flowvarlib.c:109:28: note: Assuming allocation function fails
uint8_t *buf = SCMalloc(len + 1);
^
src/util-lua-flowvarlib.c:109:28: note: Assignment 'buf=malloc(len+1)', assigned value is 0
uint8_t *buf = SCMalloc(len + 1);
^
src/util-lua-flowvarlib.c:110:12: note: Null pointer dereference
memcpy(buf, value, len);
^
src/util-lua-flowvarlib.c:111:5: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory]
buf[len] = '\0';
^
src/util-lua-flowvarlib.c:109:28: note: Assuming allocation function fails
uint8_t *buf = SCMalloc(len + 1);
^
src/util-lua-flowvarlib.c:109:28: note: Assignment 'buf=malloc(len+1)', assigned value is 0
uint8_t *buf = SCMalloc(len + 1);
^
src/util-lua-flowvarlib.c:111:5: note: Null pointer dereference
buf[len] = '\0';