On Sun, 2009-04-12 at 14:46 +0200, phcoder wrote: > - grub_itoa (tmp, c, n); > + grub_lltoa (tmp, c, n);
Wrong. For "x" and "u" specifiers, the value is unsigned int, but n is signed int. If we extend signed into to unsigned long long, we get a sign extension that would be incorrect. Suppose the argument is 0xffffffff. n would be -1. grub_lltoa() would get (unsigned long long)-1, that is 0xffffffffffffffff. If the type is going to be converted, we need to treat signed and unsigned values separately. -- Regards, Pavel Roskin _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel