mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 21:29:49 +00:00
Fix double-free in canvas.c (#15379)
This commit is contained in:
parent
6ad8b49b6c
commit
5da7f2476c
@ -425,7 +425,7 @@ R_API void r_cons_canvas_print(RConsCanvas *c) {
|
||||
}
|
||||
|
||||
R_API int r_cons_canvas_resize(RConsCanvas *c, int w, int h) {
|
||||
if (!c || w < 0) {
|
||||
if (!c || w < 0 || h <= 0) {
|
||||
return false;
|
||||
}
|
||||
int *newblen = realloc (c->blen, sizeof *c->blen * h);
|
||||
|
Loading…
Reference in New Issue
Block a user