From ccf225641e52da335fb99e7c7a9f63fc6a79755a Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 21 Aug 2012 21:39:33 +0900 Subject: [PATCH] spdycat: disallow empty header name with -H --- examples/spdycat.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/spdycat.cc b/examples/spdycat.cc index 3690be8c..f23bd479 100644 --- a/examples/spdycat.cc +++ b/examples/spdycat.cc @@ -717,7 +717,7 @@ int main(int argc, char **argv) case 'H': { char *header = optarg; char *value = strchr( optarg, ':' ); - if ( ! value ) { + if ( ! value || header == value) { std::cerr << "-H: invalid header: " << optarg << std::endl; exit(EXIT_FAILURE);