The maximum size that r_num_to_bits() (libr/util/num.c:212) will handle is 64, as it is hardcoded in the function, so allocating 64 bytes or using an static array 'char strbits[64]' (avoiding also the malloc()+free()) seems enough. Anyway, sizeof(ut64)*8 is ok, of course. But as I said, the value is hardcoded in r_num_to_bits().
On Tue, 15 Feb 2011 20:15:12 +0100 Adriana Castro <[email protected]> wrote: > Wouldn't be a better choice "sizeof (ut64)*8"? > > If the number is an ut64, and sizeof gives the num of bits, to > represent 1B are needed 8bits. > > > > El 15/02/2011, a las 18:40, Nibble <[email protected]> escribió: > > > On Tue, 15 Feb 2011 17:13:36 +0100 > > Jan Lieven <[email protected]> wrote: > > > >> Hi, > > > > Hi, > > > >> I ran into a rax2 bug: > >> > >> $ rax2 Bxaaaaa > >> 00000000000010101010101010101010b > >> *** glibc detected *** rax2: free(): invalid next size (fast): > > > > Pull the hg tip, it should be fixed now. Thanks for the report! > > > > Kind regards, > > --nibble > > _______________________________________________ > > radare mailing list > > [email protected] > > http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org > _______________________________________________ > radare mailing list > [email protected] > http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org _______________________________________________ radare mailing list [email protected] http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org
