Re: [Xen-devel] [PATCH 2/2] xl: NULL terminate buf when reading dom0 /proc/uptime

2016-03-01 Thread Ian Jackson
Ian Campbell writes ("[PATCH 2/2] xl: NULL terminate buf when reading dom0 /proc/uptime"): > The contents of /proc/uptime is typically something like "80164.57 > 640617.58", so the existing 512 byte buffer is more than large enoguh, > so reduce its effective size to 511 bytes and ensure we

[Xen-devel] [PATCH 2/2] xl: NULL terminate buf when reading dom0 /proc/uptime

2016-02-17 Thread Ian Campbell
The contents of /proc/uptime is typically something like "80164.57 640617.58", so the existing 512 byte buffer is more than large enoguh, so reduce its effective size to 511 bytes and ensure we include a NULL. Otherwise Coverity points out that we pass a potentially unterminated string to strtok.