mirror of git://git.sysmocom.de/ofono
mbimmodem: fix crash
==12340== Invalid read of size 1 ==12340== at 0x4C2F9A0: __strncpy_sse2_unaligned (vg_replace_strmem.c:548) ==12340== by 0x4A3520: strncpy (string3.h:126) ==12340== by 0x4A3520: mbim_current_operator_cb (network-registration.c:178) ==12340== by 0x49DC5D: dispatch_command_done (mbim.c:529) ==12340== by 0x49DC5D: dispatch_message (mbim.c:594) ==12340== by 0x49DC5D: command_read_handler (mbim.c:701)
This commit is contained in:
parent
644df2dcc7
commit
22c625080e
|
@ -169,6 +169,9 @@ static void mbim_current_operator_cb(struct mbim_message *message, void *user)
|
|||
&roaming_text))
|
||||
goto error;
|
||||
|
||||
if (register_state < 3 || register_state > 5)
|
||||
goto error;
|
||||
|
||||
DBG("provider: %s(%s)", provider_name, provider_id);
|
||||
|
||||
/* If MBIMRegisterStateRoaming or MBIMRegisterStatePartner */
|
||||
|
|
Loading…
Reference in New Issue