package cgiemail
tags 431761 + patch
thanks

I created the following patch to fix this bug.

--- cgilib.c    2006-10-17 22:02:49.000000000 +1000
+++ cgilib.c    2008-04-06 14:14:55.000000000 +1000
@@ -73,7 +73,15 @@ int cgi_alloc_form(formp)
        {
          int content_length, total=0, bytes_read;
 
-         content_length= atoi(getenv("CONTENT_LENGTH"));
+         env_var= getenv("CONTENT_LENGTH");
+         if (!env_var)
+           {
+             formp->errcond=1;
+             sprintf(formp->errmsg,
+                     "400 CONTENT_LENGTH not set.");
+             return(1);
+           }
+         content_length= atoi(env_var);
          cgi_query=malloc(content_length+1);
          if (!cgi_query)
            {

Attachment: signature.asc
Description: Digital signature

Reply via email to