svn commit: samba r16607 - in trunk/source/client: .
jra at samba.org
jra at samba.org
Wed Jun 28 04:30:42 GMT 2006
Author: jra
Date: 2006-06-28 04:30:41 +0000 (Wed, 28 Jun 2006)
New Revision: 16607
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16607
Log:
Klocwork #2035. Null deref (bit of a stretch... :-).
Jeremy.
Modified:
trunk/source/client/smbspool.c
Changeset:
Modified: trunk/source/client/smbspool.c
===================================================================
--- trunk/source/client/smbspool.c 2006-06-28 04:27:43 UTC (rev 16606)
+++ trunk/source/client/smbspool.c 2006-06-28 04:30:41 UTC (rev 16607)
@@ -72,6 +72,7 @@
struct cli_state *cli; /* SMB interface */
char null_str[1];
int tries = 0;
+ const char *dev_uri;
null_str[0] = '\0';
@@ -132,8 +133,9 @@
* Find the URI...
*/
- if (getenv("DEVICE_URI") != NULL)
- strncpy(uri, getenv("DEVICE_URI"), sizeof(uri) - 1);
+ dev_uri = getenv("DEVICE_URI");
+ if (dev_uri)
+ strncpy(uri, dev_uri, sizeof(uri) - 1);
else if (strncmp(argv[0], "smb://", 6) == 0)
strncpy(uri, argv[0], sizeof(uri) - 1);
else
More information about the samba-cvs
mailing list