git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
968178a
)
tidying: coverity issues
author
Jeremy Harris
<jgh146exb@wizmail.org>
Sat, 5 Mar 2016 16:04:57 +0000
(16:04 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Sat, 5 Mar 2016 16:04:57 +0000
(16:04 +0000)
17 files changed:
src/src/auths/tls.c
patch
|
blob
|
history
src/src/daemon.c
patch
|
blob
|
history
src/src/exim_dbutil.c
patch
|
blob
|
history
src/src/expand.c
patch
|
blob
|
history
src/src/lookups/ldap.c
patch
|
blob
|
history
src/src/mime.c
patch
|
blob
|
history
src/src/readconf.c
patch
|
blob
|
history
src/src/receive.c
patch
|
blob
|
history
src/src/sieve.c
patch
|
blob
|
history
src/src/smtp_in.c
patch
|
blob
|
history
src/src/smtp_out.c
patch
|
blob
|
history
src/src/spam.c
patch
|
blob
|
history
src/src/spool_out.c
patch
|
blob
|
history
src/src/string.c
patch
|
blob
|
history
src/src/tlscert-openssl.c
patch
|
blob
|
history
src/src/transport.c
patch
|
blob
|
history
src/src/verify.c
patch
|
blob
|
history
diff --git
a/src/src/auths/tls.c
b/src/src/auths/tls.c
index 51c096cd0875c5d5f7df3de1b5c5f263600a384d..2a995125eea4dc19ee6270e6a99244ef1209bea4 100644
(file)
--- a/
src/src/auths/tls.c
+++ b/
src/src/auths/tls.c
@@
-71,7
+71,7
@@
if (ob->server_param1)
auth_vars[expand_nmax++] = expand_string(ob->server_param1);
if (ob->server_param2)
auth_vars[expand_nmax++] = expand_string(ob->server_param2);
auth_vars[expand_nmax++] = expand_string(ob->server_param1);
if (ob->server_param2)
auth_vars[expand_nmax++] = expand_string(ob->server_param2);
-if (ob->server_param
2
)
+if (ob->server_param
3
)
auth_vars[expand_nmax++] = expand_string(ob->server_param3);
return auth_check_serv_cond(ablock);
}
auth_vars[expand_nmax++] = expand_string(ob->server_param3);
return auth_check_serv_cond(ablock);
}
diff --git
a/src/src/daemon.c
b/src/src/daemon.c
index 24874c374f0a9f8d5d61b69eea8eadf7075c2cac..ac09e2a649e453917725bd5c02f595937f8dd347 100644
(file)
--- a/
src/src/daemon.c
+++ b/
src/src/daemon.c
@@
-930,10
+930,9
@@
if (inetd_wait_mode)
listen_sockets = store_get(sizeof(int *));
(void) close(3);
if (dup2(0, 3) == -1)
listen_sockets = store_get(sizeof(int *));
(void) close(3);
if (dup2(0, 3) == -1)
- {
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
"failed to dup inetd socket safely away: %s", strerror(errno));
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
"failed to dup inetd socket safely away: %s", strerror(errno));
- }
+
listen_sockets[0] = 3;
(void) close(0);
(void) close(1);
listen_sockets[0] = 3;
(void) close(0);
(void) close(1);
@@
-957,8
+956,10
@@
if (inetd_wait_mode)
/* As per below, when creating sockets ourselves, we handle tcp_nodelay for
our own buffering; we assume though that inetd set the socket REUSEADDR. */
/* As per below, when creating sockets ourselves, we handle tcp_nodelay for
our own buffering; we assume though that inetd set the socket REUSEADDR. */
- if (tcp_nodelay) setsockopt(3, IPPROTO_TCP, TCP_NODELAY,
- (uschar *)(&on), sizeof(on));
+ if (tcp_nodelay)
+ if (setsockopt(3, IPPROTO_TCP, TCP_NODELAY, US &on, sizeof(on)))
+ log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to set socket NODELAY: %s",
+ strerror(errno));
}
}
diff --git
a/src/src/exim_dbutil.c
b/src/src/exim_dbutil.c
index 262e39044321f4675658e134a3637f39bd0c4ceb..4dd143feac970f031744d89b3cc6bdb8dc13dbb5 100644
(file)
--- a/
src/src/exim_dbutil.c
+++ b/
src/src/exim_dbutil.c
@@
-285,8
+285,9
@@
if (sigalrm_seen) errno = ETIMEDOUT;
if (rc < 0)
{
printf("** Failed to get %s lock for %s: %s",
if (rc < 0)
{
printf("** Failed to get %s lock for %s: %s",
- ((flags & O_RDONLY) != 0)? "read" : "write", buffer,
- (errno == ETIMEDOUT)? "timed out" : strerror(errno));
+ flags & O_WRONLY ? "write" : "read",
+ buffer,
+ errno == ETIMEDOUT ? "timed out" : strerror(errno));
(void)close(dbblock->lockfd);
return NULL;
}
(void)close(dbblock->lockfd);
return NULL;
}
diff --git
a/src/src/expand.c
b/src/src/expand.c
index b4cc79d4b46a7eee0aa387c2424732bef3d1de39..5bb9df1b63dfe944bc8af18be5aafb9d340e792e 100644
(file)
--- a/
src/src/expand.c
+++ b/
src/src/expand.c
@@
-1851,7
+1851,9
@@
switch (vp->type)
start_offset = SPOOL_DATA_START_OFFSET;
}
}
start_offset = SPOOL_DATA_START_OFFSET;
}
}
- lseek(deliver_datafile, start_offset, SEEK_SET);
+ if (lseek(deliver_datafile, start_offset, SEEK_SET) < 0)
+ log_write(0, LOG_MAIN|LOG_PANIC_DIE, "deliver_datafile lseek: %s",
+ strerror(errno));
len = read(deliver_datafile, body, len);
if (len > 0)
{
len = read(deliver_datafile, body, len);
if (len > 0)
{
diff --git
a/src/src/lookups/ldap.c
b/src/src/lookups/ldap.c
index fe67e7f0a6f4bc665cc298d79f99970ff5951b77..0f78a94523b3c2f1e1a454cd9aca2b0859949ea7 100644
(file)
--- a/
src/src/lookups/ldap.c
+++ b/
src/src/lookups/ldap.c
@@
-847,12
+847,10
@@
while ((rc = ldap_result(lcp->ld, msgid, 0, timeoutptr, &result)) ==
{
int j;
for (j = 0; j < len; j++)
{
int j;
for (j = 0; j < len; j++)
- {
if (value[j] == ',')
data = string_cat(data, &size, &ptr, US",,", 2);
else
data = string_cat(data, &size, &ptr, value+j, 1);
if (value[j] == ',')
data = string_cat(data, &size, &ptr, US",,", 2);
else
data = string_cat(data, &size, &ptr, value+j, 1);
- }
}
}
diff --git
a/src/src/mime.c
b/src/src/mime.c
index 6a64b26b1f8f6e8a17ff645029f0740130726a45..bf140ccfb83a67712c87dff8359dc846701bd3d9 100644
(file)
--- a/
src/src/mime.c
+++ b/
src/src/mime.c
@@
-304,7
+304,8
@@
decode_function =
size_counter = decode_function(mime_stream, decode_file, mime_current_boundary);
clearerr(mime_stream);
size_counter = decode_function(mime_stream, decode_file, mime_current_boundary);
clearerr(mime_stream);
-fseek(mime_stream, f_pos, SEEK_SET);
+if (fseek(mime_stream, f_pos, SEEK_SET))
+ return DEFER;
if (fclose(decode_file) != 0 || size_counter < 0)
return DEFER;
if (fclose(decode_file) != 0 || size_counter < 0)
return DEFER;
diff --git
a/src/src/readconf.c
b/src/src/readconf.c
index 7396c8bd930f7c83694bdf262b5ac1f2dc9ae3a6..3a4a4c3bfea67f9947ba24b66d2eaf2948bbf8e6 100644
(file)
--- a/
src/src/readconf.c
+++ b/
src/src/readconf.c
@@
-3618,9
+3618,9
@@
while ((buffer = get_config_line()) != NULL)
if (isupper(*name) && *s == '=')
{
if (isupper(*name) && *s == '=')
{
- if (d
!= NULL
)
+ if (d)
{
{
- if (
d->driver_name == NULL
)
+ if (
!d->driver_name
)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"no driver defined for %s \"%s\"", class, d->name);
(d->info->init)(d);
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"no driver defined for %s \"%s\"", class, d->name);
(d->info->init)(d);
@@
-3640,9
+3640,9
@@
while ((buffer = get_config_line()) != NULL)
/* Finish off initializing the previous driver. */
/* Finish off initializing the previous driver. */
- if (d
!= NULL
)
+ if (d)
{
{
- if (
d->driver_name == NULL
)
+ if (
!d->driver_name
)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"no driver defined for %s \"%s\"", class, d->name);
(d->info->init)(d);
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"no driver defined for %s \"%s\"", class, d->name);
(d->info->init)(d);
@@
-3650,7
+3650,7
@@
while ((buffer = get_config_line()) != NULL)
/* Check that we haven't already got a driver of this name */
/* Check that we haven't already got a driver of this name */
- for (d = *anchor; d
!= NULL
; d = d->next)
+ for (d = *anchor; d; d = d->next)
if (Ustrcmp(name, d->name) == 0)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"there are two %ss called \"%s\"", class, name);
if (Ustrcmp(name, d->name) == 0)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"there are two %ss called \"%s\"", class, name);
@@
-3661,7
+3661,7
@@
while ((buffer = get_config_line()) != NULL)
d = store_get(instance_size);
memcpy(d, instance_default, instance_size);
*p = d;
d = store_get(instance_size);
memcpy(d, instance_default, instance_size);
*p = d;
- p = &
(d->next)
;
+ p = &
d->next
;
d->name = string_copy(name);
/* Clear out the "set" bits in the generic options */
d->name = string_copy(name);
/* Clear out the "set" bits in the generic options */
@@
-3679,8
+3679,8
@@
while ((buffer = get_config_line()) != NULL)
/* Not the start of a new driver. Give an error if we have not set up a
current driver yet. */
/* Not the start of a new driver. Give an error if we have not set up a
current driver yet. */
- if (
d == NULL) log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN,
- "%s name missing", class);
+ if (
!d)
+
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN,
"%s name missing", class);
/* First look to see if this is a generic option; if it is "driver",
initialize the driver. If is it not a generic option, we can look for a
/* First look to see if this is a generic option; if it is "driver",
initialize the driver. If is it not a generic option, we can look for a
@@
-3689,7
+3689,7
@@
while ((buffer = get_config_line()) != NULL)
if (readconf_handle_option(buffer, driver_optionlist,
driver_optionlist_count, d, NULL))
{
if (readconf_handle_option(buffer, driver_optionlist,
driver_optionlist_count, d, NULL))
{
- if (
d->info == NULL && d->driver_name != NULL
)
+ if (
!d->info && d->driver_name
)
init_driver(d, drivers_available, size_of_info, class);
}
init_driver(d, drivers_available, size_of_info, class);
}
@@
-3697,11
+3697,9
@@
while ((buffer = get_config_line()) != NULL)
live therein. A flag with each option indicates if it is in the public
block. */
live therein. A flag with each option indicates if it is in the public
block. */
- else if (d->info != NULL)
- {
+ else if (d->info)
readconf_handle_option(buffer, d->info->options,
*(d->info->options_count), d, US"option \"%s\" unknown");
readconf_handle_option(buffer, d->info->options,
*(d->info->options_count), d, US"option \"%s\" unknown");
- }
/* The option is not generic and the driver name has not yet been given. */
/* The option is not generic and the driver name has not yet been given. */
@@
-3711,9
+3709,9
@@
while ((buffer = get_config_line()) != NULL)
/* Run the initialization function for the final driver. */
/* Run the initialization function for the final driver. */
-if (d
!= NULL
)
+if (d)
{
{
- if (
d->driver_name == NULL
)
+ if (
!d->driver_name
)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"no driver defined for %s \"%s\"", class, d->name);
(d->info->init)(d);
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"no driver defined for %s \"%s\"", class, d->name);
(d->info->init)(d);
@@
-4072,22
+4070,19
@@
readconf_driver_init(US"authenticator",
optionlist_auths, /* generic options */
optionlist_auths_size);
optionlist_auths, /* generic options */
optionlist_auths_size);
-for (au = auths; au
!= NULL
; au = au->next)
+for (au = auths; au; au = au->next)
{
{
- if (
au->public_name == NULL
)
+ if (
!au->public_name
)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG, "no public name specified for "
"the %s authenticator", au->name);
log_write(0, LOG_PANIC_DIE|LOG_CONFIG, "no public name specified for "
"the %s authenticator", au->name);
- for (bu = au->next; bu != NULL; bu = bu->next)
- {
+
+ for (bu = au->next; bu; bu = bu->next)
if (strcmpic(au->public_name, bu->public_name) == 0)
if (strcmpic(au->public_name, bu->public_name) == 0)
- {
if ((au->client && bu->client) || (au->server && bu->server))
log_write(0, LOG_PANIC_DIE|LOG_CONFIG, "two %s authenticators "
"(%s and %s) have the same public name (%s)",
if ((au->client && bu->client) || (au->server && bu->server))
log_write(0, LOG_PANIC_DIE|LOG_CONFIG, "two %s authenticators "
"(%s and %s) have the same public name (%s)",
-
(au->client)
? US"client" : US"server", au->name, bu->name,
+
au->client
? US"client" : US"server", au->name, bu->name,
au->public_name);
au->public_name);
- }
- }
}
}
}
}
diff --git
a/src/src/receive.c
b/src/src/receive.c
index a479e12cda152c7ffe036f1b5637b8902796384b..f047392b74d1b7b3c915426db9fc3d8bf97831c2 100644
(file)
--- a/
src/src/receive.c
+++ b/
src/src/receive.c
@@
-1316,7
+1316,7
@@
if (recipients_count == 1) received_for = recipients_list[0].address;
received = expand_string(received_header_text);
received_for = NULL;
received = expand_string(received_header_text);
received_for = NULL;
-if (
received == NULL
)
+if (
!received
)
{
if(spool_name[0] != 0)
Uunlink(spool_name); /* Lose the data file */
{
if(spool_name[0] != 0)
Uunlink(spool_name); /* Lose the data file */
diff --git
a/src/src/sieve.c
b/src/src/sieve.c
index 3d7e99b27b332c27317917f4bd8db12a865fcbef..8edb0b8b72a8b918f0dcc31414cc0a796ea94847 100644
(file)
--- a/
src/src/sieve.c
+++ b/
src/src/sieve.c
@@
-433,7
+433,7
@@
if (*uri && *uri!='?')
if (uri>start)
{
capacity=0;
if (uri>start)
{
capacity=0;
- to.character=
(uschar*)0
;
+ to.character=
NULL
;
to.length=0;
to.character=string_cat(to.character,&capacity,&to.length,start,uri-start);
to.character[to.length]='\0';
to.length=0;
to.character=string_cat(to.character,&capacity,&to.length,start,uri-start);
to.character[to.length]='\0';
@@
-467,7
+467,7
@@
if (*uri=='?')
if (uri>start)
{
capacity=0;
if (uri>start)
{
capacity=0;
- hname.character=
(uschar*)0
;
+ hname.character=
NULL
;
hname.length=0;
hname.character=string_cat(hname.character,&capacity,&hname.length,start,uri-start);
hname.character[hname.length]='\0';
hname.length=0;
hname.character=string_cat(hname.character,&capacity,&hname.length,start,uri-start);
hname.character[hname.length]='\0';
@@
-490,7
+490,7
@@
if (*uri=='?')
if (uri>start)
{
capacity=0;
if (uri>start)
{
capacity=0;
- hvalue.character=
(uschar*)0
;
+ hvalue.character=
NULL
;
hvalue.length=0;
hvalue.character=string_cat(hvalue.character,&capacity,&hvalue.length,start,uri-start);
hvalue.character[hvalue.length]='\0';
hvalue.length=0;
hvalue.character=string_cat(hvalue.character,&capacity,&hvalue.length,start,uri-start);
hvalue.character[hvalue.length]='\0';
diff --git
a/src/src/smtp_in.c
b/src/src/smtp_in.c
index 202fcf1bb326376a482894a94852d757b3fbfbbd..98968f95dd349d34826e7d9639e7eec2f2385665 100644
(file)
--- a/
src/src/smtp_in.c
+++ b/
src/src/smtp_in.c
@@
-2353,10
+2353,9
@@
code = US"220"; /* Default status code */
esc = US""; /* Default extended status code */
esclen = 0; /* Length of esc */
esc = US""; /* Default extended status code */
esclen = 0; /* Length of esc */
-if (
user_msg == NULL
)
+if (
!user_msg
)
{
{
- s = expand_string(smtp_banner);
- if (s == NULL)
+ if (!(s = expand_string(smtp_banner)))
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Expansion of \"%s\" (smtp_banner) "
"failed: %s", smtp_banner, expand_string_message);
}
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Expansion of \"%s\" (smtp_banner) "
"failed: %s", smtp_banner, expand_string_message);
}
diff --git
a/src/src/smtp_out.c
b/src/src/smtp_out.c
index c55b29254069cbef0b0aa812d7bde3555d36a862..06bc1dfd3b097c2521d69e065c7b2a3895ce0515 100644
(file)
--- a/
src/src/smtp_out.c
+++ b/
src/src/smtp_out.c
@@
-165,7
+165,9
@@
if ((sock = ip_socket(SOCK_STREAM, host_af)) < 0) return -1;
/* Set TCP_NODELAY; Exim does its own buffering. */
/* Set TCP_NODELAY; Exim does its own buffering. */
-setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (uschar *)(&on), sizeof(on));
+if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, US &on, sizeof(on)))
+ HDEBUG(D_transport|D_acl|D_v)
+ debug_printf("failed to set NODELAY: %s ", strerror(errno));
/* Set DSCP value, if we can. For now, if we fail to set the value, we don't
bomb out, just log it and continue in default traffic class. */
/* Set DSCP value, if we can. For now, if we fail to set the value, we don't
bomb out, just log it and continue in default traffic class. */
diff --git
a/src/src/spam.c
b/src/src/spam.c
index 51ae88f50585075e54a9a1f0fd92cdb018913b50..1159d36874ff02df9b41ffffc405c836875274c2 100644
(file)
--- a/
src/src/spam.c
+++ b/
src/src/spam.c
@@
-367,13
+367,6
@@
start = time(NULL);
}
}
}
}
-if (spamd_sock == -1)
- {
- log_write(0, LOG_MAIN|LOG_PANIC,
- "programming fault, spamd_sock unexpectedly unset");
- goto defer;
- }
-
(void)fcntl(spamd_sock, F_SETFL, O_NONBLOCK);
/* now we are connected to spamd on spamd_sock */
if (sd->is_rspamd)
(void)fcntl(spamd_sock, F_SETFL, O_NONBLOCK);
/* now we are connected to spamd on spamd_sock */
if (sd->is_rspamd)
diff --git
a/src/src/spool_out.c
b/src/src/spool_out.c
index 8d0ee7c719a19ba2a204440ca036a6f0622859f2..62909915ffe4d68f5db5df18ad93fdd8c6988015 100644
(file)
--- a/
src/src/spool_out.c
+++ b/
src/src/spool_out.c
@@
-329,7
+329,8
@@
if (EXIMfsync(fileno(f)) < 0)
/* Get the size of the file, and close it. */
/* Get the size of the file, and close it. */
-fstat(fd, &statbuf);
+if (fstat(fd, &statbuf) != 0)
+ return spool_write_error(where, errmsg, US"fstat", temp_name, NULL);
if (fclose(f) != 0)
return spool_write_error(where, errmsg, US"close", temp_name, NULL);
if (fclose(f) != 0)
return spool_write_error(where, errmsg, US"close", temp_name, NULL);
diff --git
a/src/src/string.c
b/src/src/string.c
index b559a9f193413637106f12170ed0c9f79ae6f415..28d5780150e90bfe6318d5df2767b876a951d7e9 100644
(file)
--- a/
src/src/string.c
+++ b/
src/src/string.c
@@
-913,7
+913,7
@@
sep_is_special = iscntrl(sep);
if (buffer != NULL)
{
if (buffer != NULL)
{
-
register
int p = 0;
+ int p = 0;
for (; *s != 0; s++)
{
if (*s == sep && (*(++s) != sep || sep_is_special)) break;
for (; *s != 0; s++)
{
if (*s == sep && (*(++s) != sep || sep_is_special)) break;
diff --git
a/src/src/tlscert-openssl.c
b/src/src/tlscert-openssl.c
index 29fe293c107c1c73453057ef658ad4c795b2a498..82f04955e67f1f9a4919413abdc62ec45c14bc51 100644
(file)
--- a/
src/src/tlscert-openssl.c
+++ b/
src/src/tlscert-openssl.c
@@
-123,7
+123,7
@@
int len;
if (!bp)
return badalloc();
len = ASN1_TIME_print(bp, asntime);
if (!bp)
return badalloc();
len = ASN1_TIME_print(bp, asntime);
-len = len > 0 ? (int) BIO_get_mem_data(bp, &s) : 0;
+len = len > 0 ? (int) BIO_get_mem_data(bp,
CSS
&s) : 0;
if (mod && Ustrcmp(mod, "raw") == 0) /* native ASN */
s = string_copyn(s, len);
if (mod && Ustrcmp(mod, "raw") == 0) /* native ASN */
s = string_copyn(s, len);
@@
-141,7
+141,7
@@
else
/*XXX %Z might be glibc-specific? Solaris has it, at least*/
/*XXX should we switch to POSIX locale for this? */
tm.tm_isdst = 0;
/*XXX %Z might be glibc-specific? Solaris has it, at least*/
/*XXX should we switch to POSIX locale for this? */
tm.tm_isdst = 0;
- if (!strptime(CCS s, "%b %e %T %Y %Z", &tm))
+ if (!
len || !
strptime(CCS s, "%b %e %T %Y %Z", &tm))
expand_string_message = US"failed time conversion";
else
expand_string_message = US"failed time conversion";
else
diff --git
a/src/src/transport.c
b/src/src/transport.c
index c14b60f4e8388007939fc831b8b9373e1024194f..6b72521e58ef8673438ec1092dca73a855eacbb6 100644
(file)
--- a/
src/src/transport.c
+++ b/
src/src/transport.c
@@
-655,7
+655,7
@@
for (h = header_list; h != NULL; h = h->next) if (h->type != htype_old)
errno = ERRNO_CHHEADER_FAIL;
return FALSE;
}
errno = ERRNO_CHHEADER_FAIL;
return FALSE;
}
- len =
Ustrlen(s)
;
+ len =
s ? Ustrlen(s) : 0
;
if (strncmpic(h->text, s, len) != 0) continue;
ss = h->text + len;
while (*ss == ' ' || *ss == '\t') ss++;
if (strncmpic(h->text, s, len) != 0) continue;
ss = h->text + len;
while (*ss == ' ' || *ss == '\t') ss++;
@@
-933,7
+933,8
@@
if ((options & topt_no_body) == 0)
{
nl_check_length = abs(nl_check_length);
nl_partial_match = 0;
{
nl_check_length = abs(nl_check_length);
nl_partial_match = 0;
- lseek(deliver_datafile, SPOOL_DATA_START_OFFSET, SEEK_SET);
+ if (lseek(deliver_datafile, SPOOL_DATA_START_OFFSET, SEEK_SET) < 0)
+ return FALSE;
while ((len = read(deliver_datafile, deliver_in_buffer,
DELIVER_IN_BUFFER_SIZE)) > 0)
{
while ((len = read(deliver_datafile, deliver_in_buffer,
DELIVER_IN_BUFFER_SIZE)) > 0)
{
diff --git
a/src/src/verify.c
b/src/src/verify.c
index 3d4f885501be6a01e0f2d628e03e58d2e700b9a5..6c36be37151f41bc2fdd202511fb9d50fb692d4d 100644
(file)
--- a/
src/src/verify.c
+++ b/
src/src/verify.c
@@
-3191,9
+3191,9
@@
if (iplookup)
/* Now do the actual lookup; note that there is no search_close() because
of the caching arrangements. */
/* Now do the actual lookup; note that there is no search_close() because
of the caching arrangements. */
- handle = search_open(filename, search_type, 0, NULL, NULL);
- if (handle == NULL) log_write(0, LOG_MAIN|LOG_PANIC_DIE, "%s",
- search_error_message);
+ if (!(handle = search_open(filename, search_type, 0, NULL, NULL)))
+ log_write(0, LOG_MAIN|LOG_PANIC_DIE, "%s", search_error_message);
+
result = search_find(handle, filename, key, -1, NULL, 0, 0, NULL);
if (valueptr != NULL) *valueptr = result;
return (result != NULL)? OK : search_find_defer? DEFER: FAIL;
result = search_find(handle, filename, key, -1, NULL, 0, 0, NULL);
if (valueptr != NULL) *valueptr = result;
return (result != NULL)? OK : search_find_defer? DEFER: FAIL;