[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] fix insufficient memory allocation in imap/smtp code
From: |
Enrico Scholz |
Subject: |
[PATCH] fix insufficient memory allocation in imap/smtp code |
Date: |
Wed, 10 Jun 2009 22:01:46 +0200 |
There was written 'line[pos + 1]' although only space for 'pos + 1'
elements was allocated.
Signed-off-by: Enrico Scholz <address@hidden>
---
src/gsasl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gsasl.c b/src/gsasl.c
index 81ce194..78bbc3c 100644
--- a/src/gsasl.c
+++ b/src/gsasl.c
@@ -753,7 +753,7 @@ main (int argc, char *argv[])
if (pos < 2 || strcmp (&line[pos-2], "\r\n") != 0)
{
- char *tmp = realloc (line, pos + 1);
+ char *tmp = realloc (line, pos + 2);
if (!tmp)
error (EXIT_FAILURE, errno, "realloc");
line = tmp;
--
1.6.0.6
- [PATCH] fix insufficient memory allocation in imap/smtp code,
Enrico Scholz <=