Opened 12 years ago

Closed 12 years ago

#954 closed defect (fixed)

openssl egg is tripping on utf8, someplace

Reported by: sethalves Owned by: Thomas Chust
Priority: minor Milestone: someday
Component: extensions Version: 4.8.x
Keywords: openssl utf8 Cc:
Estimated difficulty:


When using read-byte on a port returned from the openssl egg, if a byte with a high bit set arrives, something goes wrong.


The second paste outputs:

(61 62 63 1fffef 1fffbf 1fffa0 31 32 33)

rather than the expected:

(61 62 63 ef bf a0 31 32 33)

Attachments (1)

openssl-get-uchar.diff.txt (408 bytes) - added by Jim Ursetto 12 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 12 years ago by Jim Ursetto

I haven't tested this, but try the attached patch if you can. The issue appears to be a sign error; C_make_character effectively expects int (or an unsigned char). If passed a regular char with high bit set, that's a negative value, which is sign-extended when converted to int and then treated as unicode.

Changed 12 years ago by Jim Ursetto

Attachment: openssl-get-uchar.diff.txt added

comment:2 Changed 12 years ago by Jim Ursetto

Owner: set to Thomas Chust
Status: newassigned

Reported to work by sethalves on IRC. I'll leave this open for about a week and commit it if Thomas does not get a chance.

comment:3 Changed 12 years ago by Jim Ursetto

Resolution: fixed
Status: assignedclosed

Fixed in 1.6.2.

Note: See TracTickets for help on using tickets.