[PATCH] Bogus code in parsing of iocharset in isofs

From: Horms
Date: Tue Aug 16 2005 - 03:47:23 EST


Hi,

this is a followup for the patch I sent earlier (like about 2 minutes
ago) regarding isofs options parsing. In the course of debuging this
Marcelo pointed out the following code

#ifdef CONFIG_JOLIET
if (!strcmp(this_char,"iocharset") && value) {
popt->iocharset = value;
while (*value && *value != ',')
value++;
if (value == popt->iocharset)
return 0;
*value = 0;
} else
#endif

On inspection it turns out that because of use of strtok(),
*value is already NULL terminated, and thus the code snippet
above is largely bogus. The following patch should remove the
bogus code without changing functionality.

Signed-off-by: Horms <horms@xxxxxxxxxxxx>

--- ../build-386/fs/isofs/inode.c 2005-08-03 14:46:33.000000000 +0900
+++ fs/isofs/inode.c 2005-08-16 17:23:04.000000000 +0900
@@ -324,12 +324,9 @@

#ifdef CONFIG_JOLIET
if (!strcmp(this_char,"iocharset") && value) {
- popt->iocharset = value;
- while (*value && *value != ',')
- value++;
- if (value == popt->iocharset)
+ if (!value)
return 0;
- *value = 0;
+ popt->iocharset = value;
} else
#endif
if (!strcmp(this_char,"map") && value) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/