Skip to content

Commit

Permalink
Fix #2765
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarofe authored and radare committed Jun 17, 2015
1 parent 1b69ac9 commit 5d8ce1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libr/util/str.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ static char *r_str_escape_ (const char *buf, const int dot_nl) {
p++;
/* Parse the ANSI code (only the graphic mode
* set ones are supported) */
if (*p == '\0') break;
if (*p == '\0') goto out;
if (*p == '[')
for (p++; *p != 'm'; p++)
;
Expand All @@ -940,6 +940,7 @@ static char *r_str_escape_ (const char *buf, const int dot_nl) {
p++;
}

out:
*q = '\0';

return new_buf;
Expand Down

0 comments on commit 5d8ce1b

Please sign in to comment.