Skip to content
Browse files

Throw on skipping an invalid type.

Certain values (e.g.) T_STOP should not appear as a skip type. Allowing them to
can cause thrift to loop unboundedly.

Reviewed By: spalamarchuk

Differential Revision: D15102451

fbshipit-source-id: c08d52f44f37e9c212d3480233ac217105586c9f
  • Loading branch information...
davidtgoldblatt authored and facebook-github-bot committed May 3, 2019
1 parent 247af60 commit 01686e15ec77ccb4d49a77d5bce3a01601e54d64
Showing with 3 additions and 2 deletions.
  1. +3 −2 thrift/lib/cpp/protocol/TProtocol.h
@@ -165,8 +165,9 @@ uint32_t skip(Protocol_& prot, TType arg_type) {
result += prot.readListEnd();
return result;
return 0;
default: {

0 comments on commit 01686e1

Please sign in to comment.
You can’t perform that action at this time.