[Libvir] [PATCH] Parse integers more carefully, cont'd.

Daniel P. Berrange berrange at redhat.com
Tue Nov 13 21:49:23 UTC 2007


On Mon, Nov 12, 2007 at 11:10:25PM +0100, Jim Meyering wrote:
> Here's part two in the strtol fix-up series:
> 
> Parse integers more carefully, cont'd.
> * qemud/qemud.c: Replace uses of strtol with uses of xstrtol_i.
>   Avoid overflow for very large --timeout=N values.
> * src/nodeinfo.c: In linuxNodeInfoMemPopulate and
>   linuxNodeInfoCPUPopulate, use xstrtol_i rather than strtol.
>   Unlike in qemud.c, here we allow trailing "isspace", and in
>   the case of "cpuinfo cpu MHz", also allow a "." terminator,
>   since we ignore the decimal and any following digits.
> * src/internal.h: Define xstrtol_iu, too.

Looks good to me


Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the libvir-list mailing list