THRIFT-1182. rb: Native deserializer segfaults on incorrect list element type
authorBryan Duxbury <bryanduxbury@apache.org>
Tue, 31 May 2011 20:03:29 +0000 (20:03 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Tue, 31 May 2011 20:03:29 +0000 (20:03 +0000)
commit911d2f1576197fbc4cc0f6b98c0fd5998400f906
tree80950cf0e8461278d12863b2e5ff66296a9a56d8
parentb94b5514b54581cc207cfcbeea352c050de68e67
THRIFT-1182. rb: Native deserializer segfaults on incorrect list element type

This patch causes both the pure ruby and native extension code paths to check if the data in lists, sets, and maps is of the expected type before deserlizing it. When it's not the right type, it now skips the bad data correctly.

Patch: Ilya Maykov

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1129892 13f79535-47bb-0310-9956-ffa450edef68
lib/rb/ext/struct.c
lib/rb/lib/thrift/struct_union.rb