From 8c57ec38ae327fcd648569acc915f47f0eb2547d Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 25 Nov 2018 00:56:53 +0100 Subject: Fix potential SIGSEGV in pop3_delete. Reported by Paul Kinsler. --- pop3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pop3.c b/pop3.c index fb466902..907a5879 100644 --- a/pop3.c +++ b/pop3.c @@ -1370,8 +1370,9 @@ static int pop3_delete(int sock, struct query *ctl, int number) if (ok != PS_SUCCESS) return(ok); - rec = find_uid_by_num(dofastuidl ? &ctl->oldsaved : &ctl->newsaved, number); - rec->status = UID_DELETED; + if ((rec = find_uid_by_num(dofastuidl ? &ctl->oldsaved : &ctl->newsaved, number))) + rec->status = UID_DELETED; + return(PS_SUCCESS); } -- cgit v1.2.3