Skip to content

Commit

Permalink
proto_smpp: fix utf8 for [0x7f,0xff] chars
Browse files Browse the repository at this point in the history
Thanks go to @johandeclercqdemocon for reporting this in ticket #1935

(cherry picked from commit 0838b2d)
  • Loading branch information
razvancrainea committed Jan 17, 2020
1 parent 615500f commit 88624ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/proto_smpp/smpp.c
Expand Up @@ -419,7 +419,7 @@ static int convert_gsm7_to_utf8(unsigned char *input, int input_len, char *outpu
t = table_gsm7_to_utf8[c];
else
t = c;
if (t > 0xFF) {
if (t > 0x7F) {
if (t > 0x10000) {
/* four bytes */
*p++ = 0xF0 | ((t >> 18) & 0x07); /* 11110xxx */
Expand Down

0 comments on commit 88624ba

Please sign in to comment.