diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-06-25 00:00:45 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-06-25 00:00:45 -0700 |
commit | 674cb0d167120fd169931996142e76885fa583ee (patch) | |
tree | 1ab61c2cb74c6a648a62812b744f81115edb4742 /src/sim.c | |
parent | b168c0f953838af09f611333a0e64ea3a6c586b2 (diff) | |
download | ofono-674cb0d167120fd169931996142e76885fa583ee.tar.bz2 |
sim: Add extra errors for EFmsisdn and EFad length mismatches
Diffstat (limited to 'src/sim.c')
-rw-r--r-- | src/sim.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -441,7 +441,6 @@ static void sim_pin_retries_query_cb(const struct ofono_error *error, if (error->type != OFONO_ERROR_TYPE_NO_ERROR) { ofono_error("Querying remaining pin retries failed"); - return; } @@ -1137,8 +1136,10 @@ static void sim_msisdn_read_cb(int ok, int length, int record, if (!ok) goto check; - if (record_length < 14 || length < record_length) + if (record_length < 14 || length < record_length) { + ofono_error("EFmsidn shall at least contain 14 bytes"); return; + } total = length / record_length; @@ -1758,8 +1759,10 @@ static void sim_ad_read_cb(int ok, int length, int record, if (!ok) return; - if (length < 4) + if (length < 4) { + ofono_error("EFad should contain at least four bytes"); return; + } new_mnc_length = data[3] & 0xf; |