gsm: handle case of entirely empty SPN correctly
BUG=none TEST=Insert a SIM with a present but empty (all 0xFF) SPN and check the system log for a (lack of) assertion errors from mm_charset_gsm_unpacked_to_utf8(). Change-Id: I1250494b9757c9bfdce56402a4471c598f41223f Reviewed-on: http://gerrit.chromium.org/gerrit/3139 Reviewed-by: Eric Shienbrood <ers@chromium.org> Tested-by: Nathan J. Williams <njw@chromium.org>
This commit is contained in:

committed by
Dan Williams

parent
895f0f2ea3
commit
b7820cf6e1
@@ -2002,7 +2002,7 @@ get_spn_done (MMAtSerialPort *port,
|
||||
}
|
||||
|
||||
/* Remove the FF filler at the end */
|
||||
while (bin[buflen - 1] == (char)0xff)
|
||||
while (buflen > 1 && bin[buflen - 1] == (char)0xff)
|
||||
buflen--;
|
||||
|
||||
/* First byte is metadata; remainder is GSM-7 unpacked into octets; convert to UTF8 */
|
||||
|
Reference in New Issue
Block a user