comparison gen-pdu/message.c @ 12:0fe95ca922c7

sms-gen-tpdu: check the high bit of GSM7 msg input
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 05 Aug 2023 16:55:24 +0000
parents 17dd30989c0b
children d9d722033ff1
comparison
equal deleted inserted replaced
11:9ed03ed4e673 12:0fe95ca922c7
109 else { 109 else {
110 udhl1 = 0; 110 udhl1 = 0;
111 udh_chars = 0; 111 udh_chars = 0;
112 } 112 }
113 plain_chars = input_len - udhl1; 113 plain_chars = input_len - udhl1;
114 if (check_high_bit(input + udhl1, plain_chars) < 0) {
115 fprintf(stderr, ERR_PREFIX "high bit set in GSM7 data\n",
116 input_lineno);
117 exit(1);
118 }
114 udl = udh_chars + plain_chars; 119 udl = udh_chars + plain_chars;
115 if (udl > 160) { 120 if (udl > 160) {
116 fprintf(stderr, ERR_PREFIX 121 fprintf(stderr, ERR_PREFIX
117 "message exceeds 160 septets after UDH\n", 122 "message exceeds 160 septets after UDH\n",
118 input_lineno); 123 input_lineno);