diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2019-09-10 19:30:13 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2019-09-10 19:30:13 +0000 |
commit | 715070735f81e86145b509f70ee0fae8843feab7 (patch) | |
tree | 5732201465ff9fd6c0cbb312086933ccdbc21139 /usr.sbin/smtpd | |
parent | 927dee73c4fec1854b7b252051d7587dcb8ed025 (diff) |
do not use tree_xget() between filters resume as a session may legitimately
go away due to a disconnection before a filter responds.
diff from martijn@, committing on his behalf
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/lka_filter.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/lka_filter.c b/usr.sbin/smtpd/lka_filter.c index bf7c721a501..4c5ee665698 100644 --- a/usr.sbin/smtpd/lka_filter.c +++ b/usr.sbin/smtpd/lka_filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_filter.c,v 1.48 2019/09/06 08:23:56 martijn Exp $ */ +/* $OpenBSD: lka_filter.c,v 1.49 2019/09/10 19:30:12 gilles Exp $ */ /* * Copyright (c) 2018 Gilles Chehade <gilles@poolp.org> @@ -460,7 +460,10 @@ lka_filter_process_response(const char *name, const char *line) response = ep+1; - fs = tree_xget(&sessions, reqid); + /* session can legitimately disappear on a resume */ + if ((fs = tree_xget(&sessions, reqid)) == NULL) + return; + if (strcmp(kind, "filter-dataline") == 0) { if (fs->phase != FILTER_DATA_LINE) fatalx("filter-dataline out of dataline phase"); |