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: |
Description
When using read-byte on a port returned from the openssl egg, if a byte with a high bit set arrives, something goes wrong.
See:
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)
Change History (4)
comment:1 Changed 12 years ago by
Changed 12 years ago by
Attachment: | openssl-get-uchar.diff.txt added |
---|
comment:2 Changed 12 years ago by
Owner: | set to Thomas Chust |
---|---|
Status: | new → assigned |
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.
Note: See
TracTickets for help on using
tickets.
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.