git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Avoid a crash if realloc returns a different pointer.
@ 2006-04-05 14:22 Mike McCormack
  0 siblings, 0 replies; only message in thread
From: Mike McCormack @ 2006-04-05 14:22 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 80 bytes --]

---

  imap-send.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)


[-- Attachment #2: 235cf581a853777fdb6886806ddbfcd9f782eb98.diff --]
[-- Type: text/x-patch, Size: 369 bytes --]

235cf581a853777fdb6886806ddbfcd9f782eb98
diff --git a/imap-send.c b/imap-send.c
index f3cb79b..d04259a 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)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-05 14:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-05 14:22 [PATCH] Avoid a crash if realloc returns a different pointer Mike McCormack

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).