From: Sami Kerola Date: Sun, 7 Jul 2013 19:54:48 +0000 (+0100) Subject: column: dereference of null pointer [clang-analyzer] X-Git-Tag: v2.24-rc1~430 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c630db891a1f6177b4ed136d2e20b12728096196;p=thirdparty%2Futil-linux.git column: dereference of null pointer [clang-analyzer] Signed-off-by: Sami Kerola --- diff --git a/text-utils/column.c b/text-utils/column.c index e29ea473a9..2084ba6d12 100644 --- a/text-utils/column.c +++ b/text-utils/column.c @@ -392,7 +392,7 @@ static int input(FILE *fp, int *maxlength, wchar_t ***list, int *entries) continue; } lineno++; - if (!feof(fp)) + if (!feof(fp) && p) *p = '\0'; len = wcs_width(buf); /* len = p - buf; */ if (*maxlength < len)