Security review (#331)

* Fix some issues

* add typed_data.c changes

* Make attribution after the check
This commit is contained in:
Jorge Martins
2022-08-08 13:53:41 +02:00
committed by GitHub
parent ff68de5bb7
commit b2ec3eff0a
7 changed files with 43 additions and 4 deletions

View File

@@ -242,6 +242,11 @@ bool tostring128(const uint128_t *const number,
divmod128(&rDiv, &base, &rDiv, &rMod);
out[offset++] = HEXDIGITS[(uint8_t) LOWER(rMod)];
} while (!zero128(&rDiv));
if (offset > (outLength - 1)) {
return false;
}
out[offset] = '\0';
reverseString(out, offset);
return true;