fix potential NULL array printing
This commit is contained in:
1 parent
d998fabe2f
commit
08930766cb
2 files changed
+3
-1
No files matched your search
+2
-1
@@ -303,7 +303,8 @@ void print_hex_noascii_break(const uint8_t *data, const size_t len, uint8_t brea
|
||||
|
||||
static void print_buffer_ex(const uint8_t *data, const size_t len, int level, uint8_t breaks) {
|
||||
|
||||
if (len < 1)
|
||||
// sanity checks
|
||||
if ((data == NULL) || (len < 1))
|
||||
return;
|
||||
|
||||
char buf[UTIL_BUFFER_SIZE_SPRINT + 3];
|
||||
|
||||
Reference in new issue
Block a user