Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Avoid a crash if realloc returns a different pointer.
author
Mike McCormack
<mike@codeweavers.com>
Wed, 5 Apr 2006 14:22:19 +0000
(23:22 +0900)
committer
Junio C Hamano
<junkio@cox.net>
Wed, 5 Apr 2006 20:00:07 +0000
(13:00 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
imap-send.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(from parent 1:
1cd88cc
)
diff --git
a/imap-send.c
b/imap-send.c
index ea56dc9ae5e2110c88a3538a9559a6e6d0adb23c..52e2400b57118e7f9a27c85212e1c539d16add7c 100644
(file)
--- 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)