svn commit: samba r9122 - in branches/SAMBA_4_0/source/web_server: .

tridge at samba.org tridge at samba.org
Fri Aug 5 15:34:31 GMT 2005


Author: tridge
Date: 2005-08-05 15:34:31 +0000 (Fri, 05 Aug 2005)
New Revision: 9122

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9122

Log:
cope with trailing garbage in POST contents in the web server

Modified:
   branches/SAMBA_4_0/source/web_server/web_server.c


Changeset:
Modified: branches/SAMBA_4_0/source/web_server/web_server.c
===================================================================
--- branches/SAMBA_4_0/source/web_server/web_server.c	2005-08-05 15:34:01 UTC (rev 9121)
+++ branches/SAMBA_4_0/source/web_server/web_server.c	2005-08-05 15:34:31 UTC (rev 9122)
@@ -103,7 +103,10 @@
 	   a blank line) and any post data, as indicated by the
 	   content_length */
 	if (web->input.end_of_headers &&
-	    web->input.partial.length == web->input.content_length) {
+	    web->input.partial.length >= web->input.content_length) {
+		if (web->input.partial.length > web->input.content_length) {
+			web->input.partial.data[web->input.content_length] = 0;
+		}
 		EVENT_FD_NOT_READABLE(web->conn->event.fde);
 		http_process_input(web);
 	}



More information about the samba-cvs mailing list