From fb93332b301652c25b4c152b027f53fe3282fb73 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 23 Dec 2006 16:47:50 +0000 Subject: r20333: Fix a couple of Coverity errors in one run, this was a potential NULL dereference (This used to be commit f9edfffeb5aa1fe0700c17cd1c8141c906080188) --- source3/libsmb/libsmbclient.c | 13 ++++++++----- 1 file 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) { -- cgit