[PATCH 33/34] column: dereference of null pointer [clang-analyzer]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 text-utils/column.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/text-utils/column.c b/text-utils/column.c
index 25a2286..3909887 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)
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux