Fix UAF in p9 parser, add test

This commit is contained in:
Sergi Àlvarez i Capilla 2021-12-30 21:23:10 +01:00
parent 2a117d5f4f
commit 500686304a
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@
*
* This is safe to use for 16- and 8-bit types as well.
*/
static inline st32 sign_extend32(ut32 value, int index)
R_UNUSED static inline st32 sign_extend32(ut32 value, int index)
{
ut8 shift = 31 - index;
return (st32)(value << shift) >> shift;

View File

@ -32,7 +32,7 @@ static bool load_buffer(RBinFile *bf, void **bin_obj, RBuffer *b, ut64 loadaddr,
}
static void destroy(RBinFile *bf) {
r_buf_free (bf->o->bin_obj);
// r_buf_free (bf->o->bin_obj);
}
static ut64 baddr(RBinFile *bf) {