diff options
author | 2009-11-10 14:46:18 +0000 | |
---|---|---|
committer | 2009-11-10 14:46:18 +0000 | |
commit | eb033c6421cbf002a35ef45ed29c45e567831eed (patch) | |
tree | ff24bebab74caf891396097e2c05ed4b7135bc5a | |
parent | zap old API (diff) | |
download | wireguard-openbsd-eb033c6421cbf002a35ef45ed29c45e567831eed.tar.xz wireguard-openbsd-eb033c6421cbf002a35ef45ed29c45e567831eed.zip |
In relay case, avoid freeing garbage pointer by copying the required struct
from the temporary imsg buffer.
ok gilles@
-rw-r--r-- | usr.sbin/smtpd/lka.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c index d6d18ff6f80..1cd9517388c 100644 --- a/usr.sbin/smtpd/lka.c +++ b/usr.sbin/smtpd/lka.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka.c,v 1.92 2009/11/10 10:25:11 jacekm Exp $ */ +/* $OpenBSD: lka.c,v 1.93 2009/11/10 14:46:18 jacekm Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -983,6 +983,7 @@ int lka_resolve_path(struct smtpd *env, struct lkasession *lkasession, struct path *path) { if (IS_RELAY(*path) || path->cond == NULL) { + path = path_dup(path); path->flags |= F_PATH_RELAY; TAILQ_INSERT_TAIL(&lkasession->deliverylist, path, entry); return 1; |