Skip to content

Commit

Permalink
Fixed overflow in canvas.c (#10460)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanpencil authored and radare committed Jun 24, 2018
1 parent 3ca17ab commit ea51883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libr/cons/canvas.c
Expand Up @@ -329,7 +329,7 @@ static int expand_line (RConsCanvas *c, int real_len, int utf8_len) {
}

R_API void r_cons_canvas_write(RConsCanvas *c, const char *s) {
if (!c || !s || !*s) {
if (!c || !s || !*s || !R_BETWEEN (0, c->y, c->h - 1) || !R_BETWEEN (0, c->x, c->w - 1)) {
return;
}

Expand Down

0 comments on commit ea51883

Please sign in to comment.