summaryrefslogtreecommitdiff
path: root/imap-send.c
diff options
context:
space:
mode:
authorLibravatar Mike McCormack <mike@codeweavers.com>2006-04-05 23:22:19 +0900
committerLibravatar Junio C Hamano <junkio@cox.net>2006-04-05 13:00:07 -0700
commit34c5a9e284c88d415559586b79487411ece6f69c (patch)
tree8bebc7e418d1ade1728c1bbbbd15af9eab094ef8 /imap-send.c
parentAvoid a divide by zero if there's no messages to send. (diff)
downloadtgif-34c5a9e284c88d415559586b79487411ece6f69c.tar.xz
Avoid a crash if realloc returns a different pointer.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'imap-send.c')
-rw-r--r--imap-send.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/imap-send.c b/imap-send.c
index ea56dc9ae5..52e2400b57 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1202,6 +1202,7 @@ read_message( FILE *f, msg_data_t *msg )
p = xrealloc(msg->data, len+1);
if (!p)
break;
+ msg->data = p;
}
r = fread( &msg->data[msg->len], 1, len - msg->len, f );
if (r <= 0)