summaryrefslogtreecommitdiffstats
path: root/contrib/opie/libopie/parsechallenge.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/opie/libopie/parsechallenge.c')
-rw-r--r--contrib/opie/libopie/parsechallenge.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/opie/libopie/parsechallenge.c b/contrib/opie/libopie/parsechallenge.c
index 2035c38..2b23a35 100644
--- a/contrib/opie/libopie/parsechallenge.c
+++ b/contrib/opie/libopie/parsechallenge.c
@@ -1,13 +1,15 @@
/* parsechallenge.c: The __opieparsechallenge() library function.
%%% copyright-cmetz-96
-This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved.
-The Inner Net License Version 2 applies to this software.
+This software is Copyright 1996-2001 by Craig Metz, All Rights Reserved.
+The Inner Net License Version 3 applies to this software.
You should have received a copy of the license with this software. If
you didn't get a copy, you may request one from <license@inner.net>.
History:
+ Modified by cmetz for OPIE 2.4. Use OPIE_SEQUENCE_MAX, check for
+ sequence number of zero.
Modified by cmetz for OPIE 2.32. Check for extended response sets.
Change prefix to double underscore.
Created by cmetz for OPIE 2.3 using generator.c as a guide.
@@ -48,7 +50,7 @@ int __opieparsechallenge FUNCTION((buffer, algorithm, sequence, seed, exts), cha
*algorithm = a->num;
}
- if ((*sequence = strtoul(++c, &c, 10)) > 9999)
+ if (((*sequence = strtoul(++c, &c, 10)) > OPIE_SEQUENCE_MAX) || !*sequence)
return -1;
while(*c && isspace(*c)) c++;
OpenPOWER on IntegriCloud