mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-11 23:16:05 +00:00
Fix oob write in rahash2
This commit is contained in:
parent
498b9d0fc4
commit
146d7b8e25
@ -474,7 +474,7 @@ int main(int argc, char **argv) {
|
||||
switch (b64mode) {
|
||||
case 1: // encode
|
||||
{
|
||||
char *out = malloc (((hashstr_len + 1) * 4) / 3);
|
||||
char *out = malloc ((((hashstr_len + 1) * 4) / 3) + 1);
|
||||
if (out) {
|
||||
r_base64_encode (out, (const ut8*)hashstr, hashstr_len);
|
||||
printf ("%s\n", out);
|
||||
|
Loading…
Reference in New Issue
Block a user