diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-04-29 07:49:47 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-04-29 07:49:47 -0700 |
commit | 8a5bce35419abd3d0b51498afcdd091b39683930 (patch) | |
tree | 488572067e2b86fbec8e0bc5861d730cb17d8c24 /src/core | |
parent | 5b8c2558843ac6f10b3e16165b07e92002207f56 (diff) |
Incoming stream id validation fixes
- correct log message on an invalid stream id
- add an additional check that the low bit indicates a client stream id on the server
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/transport/chttp2_transport.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index e32ee284e0..1bb6e7f960 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -1327,7 +1327,10 @@ static int init_header_frame_parser(transport *t, int is_continuation) { gpr_log(GPR_ERROR, "ignoring out of order new stream request on server; last stream " "id=%d, new stream id=%d", - t->last_incoming_stream_id, t->incoming_stream); + t->last_incoming_stream_id, t->incoming_stream_id); + return init_skip_frame(t, 1); + } else if ((t->incoming_stream_id & 1) == 0) { + gpr_log(GPR_ERROR, "ignoring stream with non-client generated index %d", t->incoming_stream_id); return init_skip_frame(t, 1); } t->incoming_stream = NULL; |