summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-12-23 16:47:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:41 -0500
commitfb93332b301652c25b4c152b027f53fe3282fb73 (patch)
treeb4ece926068bf244d2685fa7771c9b4a03e321c5 /source3
parentc04b94875082735cd6c083f7e62885700d297ef7 (diff)
downloadsamba-fb93332b301652c25b4c152b027f53fe3282fb73.tar.gz
samba-fb93332b301652c25b4c152b027f53fe3282fb73.tar.bz2
samba-fb93332b301652c25b4c152b027f53fe3282fb73.zip
r20333: Fix a couple of Coverity errors in one run, this was a potential NULL dereference
(This used to be commit f9edfffeb5aa1fe0700c17cd1c8141c906080188)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/libsmbclient.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index 0f0e0b834f..d9a39b1249 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -4246,11 +4246,14 @@ dos_attr_parse(SMBCCTX *context,
continue;
}
- n = strlen(attr_strings.create_time_attr);
- if (attr_strings.create_time_attr != NULL &&
- StrnCaseCmp(tok, attr_strings.create_time_attr, n) == 0) {
- dad->create_time = (time_t)strtol(tok+n+1, NULL, 10);
- continue;
+ if (attr_strings.create_time_attr != NULL) {
+ n = strlen(attr_strings.create_time_attr);
+ if (StrnCaseCmp(tok, attr_strings.create_time_attr,
+ n) == 0) {
+ dad->create_time = (time_t)strtol(tok+n+1,
+ NULL, 10);
+ continue;
+ }
}
if (StrnCaseCmp(tok, "INODE:", 6) == 0) {