Skip to content

Commit 3031330

Browse files
committed
fix null check. f-302
1 parent 5fc3780 commit 3031330

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/internal.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9169,7 +9169,10 @@ static int GetEcbCheckValue(WP11_Object* secret, byte* dataOut,
91699169
if (!hash)
91709170
return MEMORY_E;
91719171
input = XMALLOC(key->len, NULL, DYNAMIC_TYPE_TMP_BUFFER);
9172-
9172+
if (input == NULL) {
9173+
XFREE(hash, NULL, DYNAMIC_TYPE_TMP_BUFFER);
9174+
return MEMORY_E;
9175+
}
91739176
inLen = key->len;
91749177
XMEMSET(input, 0, inLen);
91759178

0 commit comments

Comments
 (0)