Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1047

rb_thrift_memory_buffer_write treats arg as string without check, segfaults if you pass non-string

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.5
    • Fix Version/s: 0.9.2
    • Component/s: Ruby - Library
    • Labels:
      None

      Description

      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;
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jaked Jake Donham
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: