Before the assigned value (0xFF) was truncated, reg->text[0] is of
type char. A corresponding test for the same value in openbsc could
only fail.
---
 src/gsm/gsm0480.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index 92a62dc..dbacefc 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -234,7 +234,7 @@ static int parse_ussd(const struct gsm48_hdr *hdr, uint16_t 
len, struct ussd_req
        case GSM0480_MTYPE_RELEASE_COMPLETE:
                LOGP(0, LOGL_DEBUG, "USS Release Complete\n");
                /* could also parse out the optional Cause/Facility data */
-               req->text[0] = 0xFF;
+               req->text[0] = '\0';
                break;
        case GSM0480_MTYPE_REGISTER:
        case GSM0480_MTYPE_FACILITY:
-- 
1.8.3.2

Reply via email to