[mapserver-commits] r9125 - branches/branch-5-4/mapserver
svn at osgeo.org
svn at osgeo.org
Mon Jun 29 09:38:05 EDT 2009
Author: sdlime
Date: 2009-06-29 09:38:04 -0400 (Mon, 29 Jun 2009)
New Revision: 9125
Modified:
branches/branch-5-4/mapserver/cgiutil.c
Log:
Added test to confirm Content-Length > 0. (#2943)
Modified: branches/branch-5-4/mapserver/cgiutil.c
===================================================================
--- branches/branch-5-4/mapserver/cgiutil.c 2009-06-28 09:47:42 UTC (rev 9124)
+++ branches/branch-5-4/mapserver/cgiutil.c 2009-06-29 13:38:04 UTC (rev 9125)
@@ -54,6 +54,11 @@
/* -------------------------------------------------------------------- */
if( getenv("CONTENT_LENGTH") != NULL ) {
data_max = (unsigned int) atoi(getenv("CONTENT_LENGTH"));
+ if(data_max <= 0) {
+ msIO_printf("Content-type: text/html%c%c",10,10);
+ msIO_printf("Content-Length too small.\n");
+ exit( 1 );
+ }
data = (char *) malloc(data_max+1);
if( data == NULL ) {
msIO_printf("Content-type: text/html%c%c",10,10);
More information about the mapserver-commits
mailing list