diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-12-15 14:25:09 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2016-12-15 15:44:49 +0000 |
commit | 922d6f79015d7a89c236c9368007440be0a703d9 (patch) | |
tree | b2061b63b1a500693cbfae6f1b8ea3e4c706b159 | |
parent | Prevent overflow beyond the end of string in caller of get_mclen() (diff) | |
download | w3m-922d6f79015d7a89c236c9368007440be0a703d9.tar.gz w3m-922d6f79015d7a89c236c9368007440be0a703d9.zip |
Revert "Prevent overflow beyond the end of string for wtf to wcs macros"
This reverts commit b4d27ba5ccffaa38e968c2bf3a8eeb9cd43928ff.
-rw-r--r-- | libwc/wtf.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libwc/wtf.c b/libwc/wtf.c index 5ec25af..ec082b1 100644 --- a/libwc/wtf.c +++ b/libwc/wtf.c @@ -173,17 +173,15 @@ wtf_type(wc_uchar *p) ((p)[3] = (((c) >> 7) & 0x7f) | 0x80), \ ((p)[4] = ( (c) & 0x7f) | 0x80) #define wtf_to_wcs16(p) \ - (strlen(p) < 3 ? 0 : \ ((wc_uint32)((p)[0] & 0x03) << 14) \ | ((wc_uint32)((p)[1] & 0x7f) << 7) \ - | ((wc_uint32)((p)[2] & 0x7f) )) + | ((wc_uint32)((p)[2] & 0x7f) ) #define wtf_to_wcs32(p) \ - (strlen(p) < 5 ? 0 : \ ((wc_uint32)((p)[0] & 0x0f) << 28) \ | ((wc_uint32)((p)[1] & 0x7f) << 21) \ | ((wc_uint32)((p)[2] & 0x7f) << 14) \ | ((wc_uint32)((p)[3] & 0x7f) << 7) \ - | ((wc_uint32)((p)[4] & 0x7f) )) + | ((wc_uint32)((p)[4] & 0x7f) ) void wtf_push(Str os, wc_ccs ccs, wc_uint32 code) |