mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-24 13:49:50 +00:00
Fix CID 1295065, 1362999
This commit is contained in:
parent
37f1756139
commit
df413fef42
@ -443,11 +443,12 @@ R_API char* r_anal_reflines_str(void *_core, ut64 addr, int opts) {
|
||||
}
|
||||
add_spaces (b, 0, pos, wide);
|
||||
str = r_buf_free_to_string (b);
|
||||
b = NULL;
|
||||
if (!str) {
|
||||
r_list_free (lvls);
|
||||
//r_buf_free_to_string already free b and if that is the case
|
||||
//b will be NULL and r_buf_free will return but if there was
|
||||
//an error we free b here
|
||||
//b will be NULL and r_buf_free will return but if there was
|
||||
//an error we free b here
|
||||
r_buf_free (b);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ r_regex_error(int errcode, const RRegex *preg, char *errbuf, size_t errbuf_size)
|
||||
|
||||
len = strlen(s) + 1;
|
||||
if (errbuf_size > 0) {
|
||||
STRLCPY(errbuf, s, errbuf_size);
|
||||
STRLCPY(errbuf, s, errbuf_size - 1);
|
||||
}
|
||||
|
||||
return(len);
|
||||
|
Loading…
Reference in New Issue
Block a user