Fix crash when data == NULL

This commit is contained in:
Konstantinos Margaritis 2025-05-28 19:44:28 +00:00
parent e0196b2ed0
commit ec05854ba8

View File

@ -1089,6 +1089,7 @@ hs_error_t HS_CDECL hs_stream_size(const hs_database_t *db,
// perusal. // perusal.
static UNUSED static UNUSED
void dumpData(const char *data, size_t len) { void dumpData(const char *data, size_t len) {
if (!data) return;
DEBUG_PRINTF("BUFFER:"); DEBUG_PRINTF("BUFFER:");
for (size_t i = 0; i < len; i++) { for (size_t i = 0; i < len; i++) {
u8 c = data[i]; u8 c = data[i];