re: cifs: use standard token parser for mount options

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

 



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

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


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux