git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Avoid a crash if realloc returns a different pointer.

From
MMMike McCormack <mike@codeweavers.com>
Date
Apr 5, 2006, 14:22 UTC
Message-ID
<4433D29B.1080802@codeweavers.com>
---
  imap-send.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
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)
Message 1 of 1 in “Avoid a crash if realloc returns a different pointer.”
  1. Avoid a crash if realloc returns a different pointer.Mike McCormack, Apr 5, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.