mobile/gsm48_mm.c: use secure gsm_7bit_decode_n

Since some 'gsm_7bit_*' functions were deprecated and replaced by
more secure ones with the '_n_' postfix in names, it's better to
use the updated functions.

Change-Id: I4499b592a0dfea71462aed19fe641419d79b3cbd
This commit is contained in:
Vadim Yanitskiy 2017-11-02 16:57:49 +07:00
parent 37872f1032
commit b353686451
1 changed files with 1 additions and 4 deletions

View File

@ -264,10 +264,7 @@ static int decode_network_name(char *name, int name_len,
length = ((in_len - 1) * 8 - padding) / 7;
if (length <= 0)
return 0;
if (length >= name_len)
length = name_len - 1;
gsm_7bit_decode(name, lv + 2, length);
name[length] = '\0';
gsm_7bit_decode_n(name, name_len, lv + 2, length);
return length;
}