* [PATCH] common: '+' is not valid phone number anymore
@ 2011-02-24 8:33 Paavo Leinonen
2011-02-24 15:47 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Paavo Leinonen @ 2011-02-24 8:33 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 771 bytes --]
Reject phone number if it contains only plus sign.
---
Hi,
Originally this issue was found while testing Call Forwarding. If
user would set call fowarding to number '+', oFono actually erased
existing CF settings. Fix was made to common.c as I don't think plus
should be considered as a valid phone number in any case.
BR,
Paavo
src/common.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/common.c b/src/common.c
index 247fff0..520360c 100644
--- a/src/common.c
+++ b/src/common.c
@@ -246,6 +246,9 @@ gboolean valid_number_format(const char *number, int length)
if (number[0] == '+')
begin = 1;
+ if (begin == len)
+ return FALSE;
+
if ((len - begin) > length)
return FALSE;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] common: '+' is not valid phone number anymore
2011-02-24 8:33 [PATCH] common: '+' is not valid phone number anymore Paavo Leinonen
@ 2011-02-24 15:47 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2011-02-24 15:47 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 570 bytes --]
Hi Paavo,
On 02/24/2011 02:33 AM, Paavo Leinonen wrote:
> Reject phone number if it contains only plus sign.
> ---
> Hi,
>
> Originally this issue was found while testing Call Forwarding. If
> user would set call fowarding to number '+', oFono actually erased
> existing CF settings. Fix was made to common.c as I don't think plus
> should be considered as a valid phone number in any case.
>
> BR,
> Paavo
>
> src/common.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
Patch has been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-24 15:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-24 8:33 [PATCH] common: '+' is not valid phone number anymore Paavo Leinonen
2011-02-24 15:47 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.