Module Name: src
Committed By: rillig
Date: Fri Aug 27 17:35:03 UTC 2021
Modified Files:
src/usr.bin/ftp: util.c
Log Message:
ftp: fix undefined behavior when parsing FEAT
lint says: warning: argument to 'function from <ctype.h>' must be cast
to 'unsigned char', not to 'int' [342]
To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/usr.bin/ftp/util.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/ftp/util.c
diff -u src/usr.bin/ftp/util.c:1.162 src/usr.bin/ftp/util.c:1.163
--- src/usr.bin/ftp/util.c:1.162 Sun Apr 25 08:26:35 2021
+++ src/usr.bin/ftp/util.c Fri Aug 27 17:35:03 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.162 2021/04/25 08:26:35 lukem Exp $ */
+/* $NetBSD: util.c,v 1.163 2021/08/27 17:35:03 rillig Exp $ */
/*-
* Copyright (c) 1997-2020 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: util.c,v 1.162 2021/04/25 08:26:35 lukem Exp $");
+__RCSID("$NetBSD: util.c,v 1.163 2021/08/27 17:35:03 rillig Exp $");
#endif /* not lint */
/*
@@ -171,7 +171,7 @@ parse_feat(const char *fline)
* work-around broken ProFTPd servers that can't
* even obey RFC 2389.
*/
- while (*fline && isspace((int)*fline))
+ while (*fline && isspace((unsigned char)*fline))
fline++;
if (strcasecmp(fline, "MDTM") == 0)