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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.5
    • 0.9.2
    • Ruby - Library
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: