[Qemu-devel] [PATCH][RESEND] qdev-properties: Fix (u)intXX parsers

2010-06-18 Thread Kevin Wolf
scanf calls must not use PRI constants, they have probably the wrong size and corrupt memory. We could replace them by SCN ones, but strtol is simpler than scanf here anyway. While at it, also fix the parsers to reject garbage after the number ("4096xyz" was accepted before). Signed-off-by: Kevin

Re: [Qemu-devel] [PATCH][RESEND] qdev-properties: Fix (u)intXX parsers

2010-06-20 Thread Richard Henderson
On 06/18/2010 09:27 AM, Kevin Wolf wrote: > scanf calls must not use PRI constants, they have probably the wrong size and > corrupt memory. We could replace them by SCN ones, but strtol is simpler than > scanf here anyway. While at it, also fix the parsers to reject garbage after > the number ("409

Re: [Qemu-devel] [PATCH][RESEND] qdev-properties: Fix (u)intXX parsers

2010-06-28 Thread Markus Armbruster
Kevin Wolf writes: > scanf calls must not use PRI constants, they have probably the wrong size and > corrupt memory. We could replace them by SCN ones, but strtol is simpler than > scanf here anyway. While at it, also fix the parsers to reject garbage after > the number ("4096xyz" was accepted be

Re: [Qemu-devel] [PATCH][RESEND] qdev-properties: Fix (u)intXX parsers

2010-06-30 Thread Aurelien Jarno
On Fri, Jun 18, 2010 at 06:27:03PM +0200, Kevin Wolf wrote: > scanf calls must not use PRI constants, they have probably the wrong size and > corrupt memory. We could replace them by SCN ones, but strtol is simpler than > scanf here anyway. While at it, also fix the parsers to reject garbage after

Re: [Qemu-devel] [PATCH][RESEND] qdev-properties: Fix (u)intXX parsers

2010-07-06 Thread Anthony Liguori
On 06/18/2010 11:27 AM, Kevin Wolf wrote: scanf calls must not use PRI constants, they have probably the wrong size and corrupt memory. We could replace them by SCN ones, but strtol is simpler than scanf here anyway. While at it, also fix the parsers to reject garbage after the number ("4096xyz"