diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2018-11-25 00:56:53 +0100 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2018-11-25 00:56:53 +0100 |
commit | 8c57ec38ae327fcd648569acc915f47f0eb2547d (patch) | |
tree | 7cd4cb8681c0e5950a24b10c9b568f5dc6f58c13 /pop3.c | |
parent | 295ff6340f665d58e369035ffa4257f2f84553d6 (diff) | |
download | fetchmail-8c57ec38ae327fcd648569acc915f47f0eb2547d.tar.gz fetchmail-8c57ec38ae327fcd648569acc915f47f0eb2547d.tar.bz2 fetchmail-8c57ec38ae327fcd648569acc915f47f0eb2547d.zip |
Fix potential SIGSEGV in pop3_delete.
Reported by Paul Kinsler.
Diffstat (limited to 'pop3.c')
-rw-r--r-- | pop3.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); } |