From 2542a55c873c335b5d16ccf23e5e580989ce986f Mon Sep 17 00:00:00 2001 From: Bhaskar Date: Fri, 17 May 2013 12:21:51 +0530 Subject: gsm48_mm.c: Bugfix: payload_len should be signed int As we later check if payload_len < 0, it should be signed, not unsigned. --- src/host/layer23/src/mobile/gsm48_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 8ac9ddc1..46b641c4 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -2042,7 +2042,7 @@ static int gsm48_mm_rx_info(struct osmocom_ms *ms, struct msgb *msg) { struct gsm48_mmlayer *mm = &ms->mmlayer; struct gsm48_hdr *gh = msgb_l3(msg); - unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh); + int payload_len = msgb_l3len(msg) - sizeof(*gh); struct tlv_parsed tp; if (payload_len < 0) { -- cgit v1.2.3