diff options
author | Stefan Sperling <ssperling@sysmocom.de> | 2018-11-12 12:52:34 +0100 |
---|---|---|
committer | Stefan Sperling <ssperling@sysmocom.de> | 2018-11-12 12:52:34 +0100 |
commit | 6eeed7c4dc6a72658009a3a88e0211d08dc2dc66 (patch) | |
tree | b49c35da77a57c246aa8d80b8555610bae36955b /src/gprs | |
parent | 68d166234740ae50fd35795f3d3e4d2fd92a1021 (diff) |
fix bogus assertion in encode_comp_field()
Fix an obvious logic bug in an assertion in encode_comp_field().
Found by: Neels
Change-Id: If6f3598cd6da4643ff2214e21c0d21f6eff0eb67
Diffstat (limited to 'src/gprs')
-rw-r--r-- | src/gprs/gprs_sndcp_xid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gprs/gprs_sndcp_xid.c b/src/gprs/gprs_sndcp_xid.c index 8f844b571..09e21f594 100644 --- a/src/gprs/gprs_sndcp_xid.c +++ b/src/gprs/gprs_sndcp_xid.c @@ -443,7 +443,7 @@ static int encode_comp_field(uint8_t *dst, unsigned int dst_maxlen, OSMO_ASSERT(comp_field->entity <= 0x1f); /* Check if the algorithm number is within bounds */ - OSMO_ASSERT(comp_field->algo >= 0 || comp_field->algo <= 0x1f); + OSMO_ASSERT(comp_field->algo >= 0 && comp_field->algo <= 0x1f); /* Zero out buffer */ memset(dst, 0, dst_maxlen); |