svn commit: samba r16608 - in branches/SAMBA_3_0/source/client: .
jra at samba.org
jra at samba.org
Wed Jun 28 04:30:52 GMT 2006
Author: jra
Date: 2006-06-28 04:30:51 +0000 (Wed, 28 Jun 2006)
New Revision: 16608
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16608
Log:
Klocwork #2035. Null deref (bit of a stretch... :-).
Jeremy.
Modified:
branches/SAMBA_3_0/source/client/smbspool.c
Changeset:
Modified: branches/SAMBA_3_0/source/client/smbspool.c
===================================================================
--- branches/SAMBA_3_0/source/client/smbspool.c 2006-06-28 04:30:41 UTC (rev 16607)
+++ branches/SAMBA_3_0/source/client/smbspool.c 2006-06-28 04:30:51 UTC (rev 16608)
@@ -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