diff -Nur gopher-3.0.3/gopherd/command.c gopher-3.0.3woody1/gopherd/command.c --- gopher-3.0.3/gopherd/command.c 2001-01-17 17:59:51.000000000 +0100 +++ gopher-3.0.3woody1/gopherd/command.c 2005-01-07 16:58:44.000000000 +0100 @@ -146,6 +146,7 @@ #include "Malloc.h" #include "String.h" #include +#include #include "util.h" #include "command.h" @@ -551,7 +552,7 @@ if (*inputline == '\0') { /*** end of HTTP headers ***/ - if (postsize > 0) { + if (postsize > 0 && (postsize + 1) < INT_MAX/sizeof(char)) { char *postdata; postdata = (char*) malloc(sizeof(char) * (postsize + 1));