smsutil: Check that udl is less than 140

This commit is contained in:
Yang Gu 2010-05-26 22:39:10 +08:00 committed by Denis Kenzior
parent beb4e2c71a
commit a9cd641855
1 changed files with 3 additions and 0 deletions

View File

@ -1262,6 +1262,9 @@ static gboolean decode_submit(const unsigned char *pdu, int len,
if ((len - offset) < expected)
return FALSE;
if (expected > (int) sizeof(out->submit.ud))
return FALSE;
memcpy(out->submit.ud, pdu+offset, expected);
return TRUE;