The strings used for temperature sensor paths might be longer than 32
bytes. If that is the case, we might truncate the actual output
string, thus making temperature sensors inaccessible in case we might
need to read an uncached data from it. This become visible after the
glitch detection code started to make frequent re-reads from sensors.
Fix it by allocating 1024 bytes for the strings instead of 32
bytes. This should be more than enough.
Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
static int make_uncached(char *path, size_t len)
{
- char p1[32], p2[32], *p = path;
+ char p1[1024], p2[1024], *p = path;
if (strstr(path, "/uncached/"))
return 0;