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
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.