mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-31 18:43:28 +00:00
Fix null deref in RCons.swapGround
This commit is contained in:
parent
29be000e3c
commit
d023e33790
@ -1223,6 +1223,9 @@ R_API char *r_cons_lastline (int *len) {
|
||||
|
||||
/* swap color from foreground to background, returned value must be freed */
|
||||
R_API char *r_cons_swap_ground(const char *col) {
|
||||
if (!col) {
|
||||
return NULL;
|
||||
}
|
||||
if (!strncmp (col, "\x1b[48;5;", 7)) {
|
||||
/* rgb background */
|
||||
return r_str_newf ("\x1b[38;5;%s", col+7);
|
||||
|
Loading…
x
Reference in New Issue
Block a user