1
0
Fork 0

Check for NULL

This commit is contained in:
hpi1 2019-07-02 11:21:14 +03:00
parent 21f15d2f58
commit 829e0c495f
1 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,8 @@ static const char *_hex2str(const uint8_t *data, size_t len)
size_t i;
str = (char*)realloc(str, 2*len + 1);
if (!str)
return "";
*str = 0;
for (i = 0; i < len; i++) {