diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2012-08-26 16:35:18 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2012-08-26 16:35:18 +0000 |
commit | 50253e5fb8651091511f245c3df2248abff80bf6 (patch) | |
tree | a851f5396fa3377e4127cb6f65533068203648ef /usr.sbin/smtpd/smtpd.c | |
parent | 5631b58bb2c881a826f18c82ced9c060ba5702ae (diff) |
correctly check compress_backend_lookup() to avoid a NULL deref
Diffstat (limited to 'usr.sbin/smtpd/smtpd.c')
-rw-r--r-- | usr.sbin/smtpd/smtpd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c index 2706358c4ee..65b56ea0ff6 100644 --- a/usr.sbin/smtpd/smtpd.c +++ b/usr.sbin/smtpd/smtpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.c,v 1.165 2012/08/26 11:52:48 gilles Exp $ */ +/* $OpenBSD: smtpd.c,v 1.166 2012/08/26 16:35:17 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -580,9 +580,9 @@ main(int argc, char *argv[]) if (env->sc_queue_compress_algo) { env->sc_compress = compress_backend_lookup(env->sc_queue_compress_algo); - if (env->sc_queue == NULL) + if (env->sc_compress == NULL) errx(1, "could not find queue compress backend \"%s\"", - env->sc_queue_compress_algo); + env->sc_queue_compress_algo); } log_init(debug); |