diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-11-04 22:56:43 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-11-04 22:56:43 +0000 |
commit | 9b699b1aebb24f4f42b0c8b89a497339fc1e1499 (patch) | |
tree | ea5a8eba6dc8eefa7449e9d1a70fd340cea78595 /imap.c | |
parent | 6a4065ca0329496d53046e3895d8d536d7ac1c24 (diff) | |
download | fetchmail-9b699b1aebb24f4f42b0c8b89a497339fc1e1499.tar.gz fetchmail-9b699b1aebb24f4f42b0c8b89a497339fc1e1499.tar.bz2 fetchmail-9b699b1aebb24f4f42b0c8b89a497339fc1e1499.zip |
Insert fseeks to prevent read-write lossage.
svn path=/trunk/; revision=485
Diffstat (limited to 'imap.c')
-rw-r--r-- | imap.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -133,6 +133,7 @@ int *sizes; else sizes[num - 1] = -1; } + fseek(sockfp, 0L, SEEK_CUR); return(0); } @@ -168,6 +169,7 @@ int *lenp; return(PS_SOCKET); } while (sscanf(buf+2, "%d FETCH (RFC822 {%d}", &num, lenp) != 2); + fseek(sockfp, 0L, SEEK_CUR); if (num != number) return(PS_ERROR); @@ -186,7 +188,10 @@ int number; if (fgets(buf, sizeof(buf), sockfp) == (char *)NULL) return(PS_SOCKET); else + { + fseek(sockfp, 0L, SEEK_CUR); return(0); + } } static int imap_delete(sockfp, ctl, number) |