mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-03 12:12:06 +00:00
More coverity
This commit is contained in:
parent
8dd161efc2
commit
9681c6fcf7
@ -103,8 +103,10 @@ static int buf_fprintf(void *stream, const char *format, ...) {
|
||||
return R_FALSE;
|
||||
va_start (ap, format);
|
||||
tmp = malloc (strlen (format)+strlen (buf_global)+2);
|
||||
if (tmp == NULL)
|
||||
if (tmp == NULL) {
|
||||
va_end (ap);
|
||||
return R_FALSE;
|
||||
}
|
||||
sprintf (tmp, "%s%s", buf_global, format);
|
||||
vsprintf (buf_global, tmp, ap);
|
||||
va_end (ap);
|
||||
|
@ -1167,6 +1167,8 @@ if (
|
||||
if (r_buf_read_at (bin->b, strtab_section->sh_offset,
|
||||
(ut8*)strtab, strtab_section->sh_size) == -1) {
|
||||
eprintf ("Warning: read (syms strtab)\n");
|
||||
free (ret);
|
||||
free (strtab);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -564,9 +564,9 @@ static RList* classes (RBinFile *arch) {
|
||||
dprintf ("# anotations_offset = %08x;\n", entry.anotations_offset);
|
||||
dprintf ("# class_data_offset = %08x;\n", entry.class_data_offset);
|
||||
dprintf ("# static_values_offset = %08x;\n\n", entry.static_values_offset);
|
||||
free (name);
|
||||
}
|
||||
}
|
||||
free (name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1343,7 +1343,10 @@ reaccept:
|
||||
r_mem_copyendian ((ut8*)&i, buf, 4, !LE);
|
||||
if (i>0&&i<RMT_MAX) {
|
||||
ptr = (ut8 *) malloc (i+7);
|
||||
if (!ptr) return R_FALSE;
|
||||
if (!ptr) {
|
||||
r_socket_close (c);
|
||||
return R_FALSE;
|
||||
}
|
||||
ptr[5]='!';
|
||||
r_socket_read_block (c, ptr+6, i);
|
||||
ptr[6+i]='\0';
|
||||
|
Loading…
x
Reference in New Issue
Block a user