Re: [PATCH] sim: Set valid number length in empty EFmsisdn records.

2010-12-21 Thread Denis Kenzior
Hi Andrew,

On 12/20/2010 06:52 AM, Andrzej Zaborowski wrote:
> Valid number length range is 1 - 10 bytes, other values, such as 0xff,
> could potentially crash external parsers.
> ---
>  src/sim.c |2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 

Patch has been applied, thanks.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH] sim: Set valid number length in empty EFmsisdn records.

2010-12-20 Thread Andrzej Zaborowski
Valid number length range is 1 - 10 bytes, other values, such as 0xff,
could potentially crash external parsers.
---
 src/sim.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/sim.c b/src/sim.c
index 9263e75..b98c4b2 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -437,6 +437,8 @@ static gboolean set_own_numbers(struct ofono_sim *sim,
new_numbers = new_numbers->next;
} else {
memset(efmsisdn, 0xff, sim->efmsisdn_length);
+   /* Set number length */
+   efmsisdn[sim->efmsisdn_length - 14] = 1;
}
 
if (ofono_sim_write(req->sim, SIM_EFMSISDN_FILEID,
-- 
1.7.1.86.g0e460.dirty

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono