Fixed data asn1 - now handles bad input better by doing correct root free of obj
This commit is contained in:
1 parent
906e3f4c32
commit
2e8bacb00f
4 files changed
+66
-34
No files matched your search
+2
-1
@@ -576,7 +576,8 @@ static int PivGetData(Iso7816CommandChannel channel, const uint8_t tag[], size_t
|
||||
struct tlvdb_root *new_root = realloc(root, sizeof(*root) + capacity);
|
||||
if (new_root == NULL) {
|
||||
PrintAndLogEx(FAILED, "Running out of memory while re-allocating buffer");
|
||||
free(root);
|
||||
//free(root);
|
||||
tlvdb_root_free(root);
|
||||
return PM3_EMALLOC;
|
||||
}
|
||||
root = new_root;
|
||||
|
||||
Reference in new issue
Block a user