mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-29 16:10:52 +00:00
anal_pickle coverity fixes (#20504)
* Add missing % in anal_pickle log format string * Ensure arg is never NULL in pickle_opasm
This commit is contained in:
parent
a4c97fb052
commit
afa2963f73
@ -444,7 +444,7 @@ static inline bool write_num_sz(ut64 n, int byte_sz, ut8 *outbuf, int outsz) {
|
||||
int bits = r_num_to_bits (NULL, n);
|
||||
// TODO: signedness prbly wrong...
|
||||
if (bits > byte_sz * 8) {
|
||||
R_LOG_ERROR ("Arg 0x" PFMT64x " more then %d bits", n, bits);
|
||||
R_LOG_ERROR ("Arg 0x%" PFMT64x " is more than %d bits", n, bits);
|
||||
false;
|
||||
}
|
||||
switch (byte_sz) {
|
||||
@ -536,6 +536,8 @@ static int pickle_opasm(RAnal *a, ut64 addr, const char *str, ut8 *outbuf, int o
|
||||
*arg = '\0';
|
||||
arg++;
|
||||
arg = r_str_ichr (arg, ' ');
|
||||
} else {
|
||||
arg = "";
|
||||
}
|
||||
|
||||
if (write_op (opstr, outbuf)) {
|
||||
|
Loading…
Reference in New Issue
Block a user