cifs: use standard token parser for mount options
Dan Carpenter
dan.carpenter at oracle.com
Wed Mar 28 04:45:41 MDT 2012
Hello Sachin Prabhu,
This is a semi-automatic email about new static checker warnings.
The patch 8830d7e07a5e: "cifs: use standard token parser for mount
options" from Mar 23, 2012, leads to the following Smatch complaint:
fs/cifs/connect.c:1607 cifs_parse_mount_options()
error: we previously assumed 'value' could be null (see line 1568)
fs/cifs/connect.c
1567 value = strchr(data, '=');
1568 if (value != NULL)
^^^^^^^^^^^^^
Check.
1569 *value++ = '\0';
1570
1571 /* Set tmp_end to end of the string */
1572 tmp_end = (char *) value + strlen(value);
^^^^^
We can't run strlen() on NULL pointers.
1573
1574 /* Check if following character is the deliminator
regards,
dan carpenter
More information about the samba-technical
mailing list