diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-10-15 23:45:08 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-10-15 23:45:08 +0000 |
commit | e69274122db6f97b940b82df119afb165e295cf9 (patch) | |
tree | 73ad8769a0b644bf12ecebbb4125cd6336a7b41b /pop3.c | |
parent | b9396f9d9f0c288376197d7c0d2bea343236f539 (diff) | |
download | fetchmail-e69274122db6f97b940b82df119afb165e295cf9.tar.gz fetchmail-e69274122db6f97b940b82df119afb165e295cf9.tar.bz2 fetchmail-e69274122db6f97b940b82df119afb165e295cf9.zip |
Wolfgang Wander's patches.
svn path=/trunk/; revision=1516
Diffstat (limited to 'pop3.c')
-rw-r--r-- | pop3.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -243,6 +243,8 @@ pop3_gettopid( int sock, int num , char *id) break; if( ! got_it && ! strncasecmp("Message-Id:", buf, 11 )) { got_it = 1; + /* prevent stack overflows */ + buf[IDLEN+12] = 0; sscanf( buf+12, "%s", id); } } @@ -284,7 +286,7 @@ pop3_slowuidl( int sock, struct query *ctl, int *countp, int *newp) if( (ok = pop3_gettopid( sock, try_id, id )) != 0 ) return ok; - try_nr = str_nr_in_list(&ctl->oldsaved, id); + try_nr = str_nr_last_in_list(&ctl->oldsaved, id); } else { try_id = *countp+1; try_nr = -1; |