[
https://issues.apache.org/jira/browse/THRIFT-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12988178#action_12988178
]
Bryan Duxbury commented on THRIFT-1047:
---------------------------------------
bq. There is no checking higher up in the call chain
That's not true, or at least it's not supposed to be. If "Thrift.type_checking
== true" then structs will type check in their setters. It's a lot faster with
type checking turned off, though, which is why I recommend that for production.
(If somehow string is erroneously avoiding type checking when type checking is
enabled, then that's a different bug...)
> rb_thrift_memory_buffer_write treats arg as string without check, segfaults
> if you pass non-string
> --------------------------------------------------------------------------------------------------
>
> Key: THRIFT-1047
> URL: https://issues.apache.org/jira/browse/THRIFT-1047
> Project: Thrift
> Issue Type: Bug
> Components: Ruby - Library
> Affects Versions: 0.5
> Reporter: Jake Donham
>
> I think there should be a call to Check_Type(str, T_STRING) in there
> VALUE rb_thrift_memory_buffer_write(VALUE self, VALUE str) {
> VALUE buf = GET_BUF(self);
> rb_str_buf_cat(buf, RSTRING_PTR(str), RSTRING_LEN(str));
> return Qnil;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.