spdycat: disallow empty header name with -H
This commit is contained in:
parent
2266b102e3
commit
ccf225641e
|
@ -717,7 +717,7 @@ int main(int argc, char **argv)
|
||||||
case 'H': {
|
case 'H': {
|
||||||
char *header = optarg;
|
char *header = optarg;
|
||||||
char *value = strchr( optarg, ':' );
|
char *value = strchr( optarg, ':' );
|
||||||
if ( ! value ) {
|
if ( ! value || header == value) {
|
||||||
std::cerr << "-H: invalid header: " << optarg
|
std::cerr << "-H: invalid header: " << optarg
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|
Loading…
Reference in New Issue