Changeset 9127


Ignore:
Timestamp:
Jun 29, 2009 6:42:46 AM (7 years ago)
Author:
sdlime
Message:

Added test to confirm Content-Length > 0. (#2943)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mapserver/cgiutil.c

    r8867 r9127  
    5555  if( getenv("CONTENT_LENGTH") != NULL ) {
    5656    data_max = (unsigned int) atoi(getenv("CONTENT_LENGTH"));
     57    if(data_max <= 0) {
     58      msIO_printf("Content-type: text/html%c%c",10,10);
     59      msIO_printf("Content-Length too small.\n");
     60      exit( 1 );
     61    }
    5762    data = (char *) malloc(data_max+1);
    5863    if( data == NULL ) {
Note: See TracChangeset for help on using the changeset viewer.