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_ui, too. Author: Jim Meyering <meyering@redhat.com>
Showing
想要评论请 注册 或 登录