X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=src%2Fhtparser.c;h=1ed91754f78f36d62c6de672fb7c1a06a9a3fff8;hp=5179a25935a0e9f328e771edf8b159f32c988a42;hb=90b0ba0f9d93e454cc08a566b718abdcbfd0d9f6;hpb=aa7e44069384016c57c417904bb45f6fa554981a diff --git a/src/htparser.c b/src/htparser.c index 5179a25..1ed9175 100644 --- a/src/htparser.c +++ b/src/htparser.c @@ -77,6 +77,8 @@ static struct hthead *parsereq(FILE *in) goto fail; } else { bufadd(method, c); + if(method.d >= 128) + goto fail; } } while(1) { @@ -87,6 +89,8 @@ static struct hthead *parsereq(FILE *in) goto fail; } else { bufadd(url, c); + if(url.d >= 65536) + goto fail; } } while(1) { @@ -98,6 +102,8 @@ static struct hthead *parsereq(FILE *in) goto fail; } else { bufadd(ver, c); + if(ver.d >= 128) + goto fail; } } bufadd(method, 0);