diff options
-rw-r--r-- | src/gsm/gsm_utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 9569cf32..fa77eae4 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -241,6 +241,12 @@ int gsm_septets2octets(uint8_t *result, const uint8_t *rdata, uint8_t septet_len result[z++] = cb; shift++; } + /* To avoid the situation where the receiving entity confuses 7 binary + * zero pad bits as the @ character, the carriage return or <CR> + * character (defined in subclause 7.1.1) shall be used for padding in + * this situation. */ + if (shift == 7) + result[z - 1] |= 0x1a; free(data); |