Showstopper deadlock when checking phone number fixed.
authorshort <>
Tue, 7 Sep 1999 11:10:36 +0000 (11:10 +0000)
committershort <>
Tue, 7 Sep 1999 11:10:36 +0000 (11:10 +0000)
mdsms.c

diff --git a/mdsms.c b/mdsms.c
index 891d18e..ad22e09 100644 (file)
--- a/mdsms.c
+++ b/mdsms.c
@@ -367,8 +367,7 @@ int i;
 char *s,*s1;
 
                chk(phone=strdup(args[optind++]));
 char *s,*s1;
 
                chk(phone=strdup(args[optind++]));
-               s=(s1=phone)+(*phone=='+');
-               while (*s && s-s1<MAXNUMLEN)
+               for (s=(s1=phone)+(*phone=='+');*s && s-s1<MAXNUMLEN;s++)
                        if (!isdigit(*s))
                                error("!Invalid digit '%c' in destination phone number - at offset %d of option %d from \"%s\": %s",
                                        *s,s-phone,optind,from,args[optind]);
                        if (!isdigit(*s))
                                error("!Invalid digit '%c' in destination phone number - at offset %d of option %d from \"%s\": %s",
                                        *s,s-phone,optind,from,args[optind]);