dect
/
libdect
Archived
13
0
Fork 0

sfmt: accept empty <<PORTABLE-IDENTITY>> IEs

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
root 2010-08-23 16:27:38 +02:00
parent f83e4b328a
commit fa12cefa8a
1 changed files with 4 additions and 0 deletions

View File

@ -508,6 +508,10 @@ static int dect_sfmt_parse_portable_identity(const struct dect_handle *dh,
struct dect_ie_portable_identity *dst = dect_ie_container(dst, *ie);
uint8_t len;
/* Empty <<PORTABLE-IDENTITY>> IEs are of length 2 */
if (src->len == 2)
return 0;
if (src->len < DECT_IE_PORTABLE_IDENTITY_MIN_SIZE)
return -1;