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

[PATCH] http-push: fix xml_entities() string parsing overrun

From
HSHunter, D. Seth <hunter@ll.mit.edu>
Date
Jul 1, 2009, 00:24 UTC
Message-ID
<D7CBF77D2B9C1D4D8C5E528FBBB35D8B58EC70ECDA@LLE2K7-BE02.mitll.ad.local>
xml_entities() in http-push.c did not properly stop at the end of the string being examined, which would occasionally cause nonsense to be appended to escaped URL strings and result in failed DAV XML queries
Signed-off-by: Seth Hunter <hunter@ll.mit.edu>
---
 http-push.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/http-push.c b/http-push.c
index 8cc8ee0..00e83dc 100644
--- a/http-push.c
+++ b/http-push.c
@@ -193,6 +193,8 @@ static char *xml_entities(char *s)
 		case '&':
 			strbuf_addstr(&buf, "&amp;");
 			break;
+		case 0:
+			return strbuf_detach(&buf, NULL);
 		}
 		s++;
 	}
-- 
1.6.3.3
Message 1 of 1 in “http-push: fix xml_entities() string parsing overrun”
  1. http-push: fix xml_entities() string parsing overrunHunter, D. Seth, Jul 1, 2009

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.