From: Mike McCormack Date: Wed, 5 Apr 2006 14:22:19 +0000 (+0900) Subject: Avoid a crash if realloc returns a different pointer. X-Git-Tag: v1.3.0-rc3~17 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=34c5a9e284c88d415559586b79487411ece6f69c;p=git.git Avoid a crash if realloc returns a different pointer. Signed-off-by: Junio C Hamano --- diff --git a/imap-send.c b/imap-send.c index ea56dc9a..52e2400b 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)