From: John Snow <jsnow@xxxxxxxxxx> In certain cases, a NULL may be passed along to string library functions. Not anymore! Signed-off-by: John Snow <jsnow@xxxxxxxxxx> Signed-off-by: David Howells <dhowells@xxxxxxxxxx> --- cachefilesd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cachefilesd.c b/cachefilesd.c index 7059876..72525bc 100644 --- a/cachefilesd.c +++ b/cachefilesd.c @@ -759,8 +759,12 @@ static void read_cache_state(void) *next++ = '\0'; arg = strchr(tok, '='); - if (arg) + if (arg) { *arg++ = '\0'; + } else { + debug(0, "Warning: malformed output from kernel, missing arg to [%s]", tok); + continue; + } if (strcmp(tok, "cull") == 0) cull = strtoul(arg, NULL, 0); -- Linux-cachefs mailing list Linux-cachefs@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/linux-cachefs