aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2005-12-08 12:02:48 +0000
committerMatthias Andree <matthias.andree@gmx.de>2005-12-08 12:02:48 +0000
commitb3f58d5f75da9c28129972ce2343f423afadb5ff (patch)
treee9f247243fd8a1b7bac463ad2115d90b42d380b6
parent7c86b3e1104b542a78984a596200cf759a5f3623 (diff)
downloadfetchmail-b3f58d5f75da9c28129972ce2343f423afadb5ff.tar.gz
fetchmail-b3f58d5f75da9c28129972ce2343f423afadb5ff.tar.bz2
fetchmail-b3f58d5f75da9c28129972ce2343f423afadb5ff.zip
Plug potential memory and socket leak when polling multiple folders or when the upstream sends bogus message sizes. Patch by Sunil Shetye.
svn path=/branches/BRANCH_6-3/; revision=4527
-rw-r--r--NEWS2
-rw-r--r--driver.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 880408b0..c0fea250 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,8 @@ fetchmail 6.3.1 (not yet released):
Reported by Heino Tiedemann and Rob MacGregor. (MA)
* Remove bogus Netscape IMAP4rev1 Service >= 3.6 warning about BODY[TEXT]
that we are not using. Patch by Sunil Shetye. (MA)
+* Plug potential memory and socket leak when polling multiple folders or when
+ the upstream sends bogus message sizes. Patch by Sunil Shetye. (MA)
fetchmail 6.3.0 (released 2005-11-30):
diff --git a/driver.c b/driver.c
index 71bd72f4..4dffcb41 100644
--- a/driver.c
+++ b/driver.c
@@ -1373,7 +1373,8 @@ is restored."));
if (count > INT_MAX/sizeof(int))
{
report(stderr, GT_("bogus message count!"));
- return(PS_PROTOCOL);
+ err = PS_PROTOCOL;
+ goto cleanUp;
}
/*
@@ -1389,6 +1390,7 @@ is restored."));
if (proto->getsizes &&
!(proto->getpartialsizes && NUM_NONZERO(ctl->fetchsizelimit)))
{
+ xfree(msgsizes);
msgsizes = xmalloc(sizeof(int) * count);
for (i = 0; i < count; i++)
msgsizes[i] = 0;