Changeset 9125


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-5-4/mapserver/cgiutil.c

    r8852 r9125  
    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.