summaryrefslogtreecommitdiffstats
path: root/contrib/opie/libopie/challenge.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/opie/libopie/challenge.c')
-rw-r--r--contrib/opie/libopie/challenge.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/opie/libopie/challenge.c b/contrib/opie/libopie/challenge.c
index 0f3fec5..149403d 100644
--- a/contrib/opie/libopie/challenge.c
+++ b/contrib/opie/libopie/challenge.c
@@ -1,7 +1,7 @@
/* challenge.c: The opiechallenge() library function.
%%% portions-copyright-cmetz-96
-Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights
+Portions of this software are Copyright 1996-1999 by Craig Metz, All Rights
Reserved. The Inner Net License Version 2 applies to these portions of
the software.
You should have received a copy of the license with this software. If
@@ -66,11 +66,11 @@ int opiechallenge FUNCTION((mp, name, ss), struct opie *mp AND char *name AND ch
#endif /* DEBUG */
}
- if (rval) {
+ if (rval ||
+ (snprintf(ss, OPIE_CHALLENGE_MAX, "otp-%s %d %s ext", algids[MDX], mp->opie_n - 1, mp->opie_seed) >= OPIE_CHALLENGE_MAX)) {
opierandomchallenge(ss);
memset(mp, 0, sizeof(*mp));
- } else
- sprintf(ss, "otp-%s %d %s ext", algids[MDX], mp->opie_n - 1, mp->opie_seed);
+ }
return rval;
}
OpenPOWER on IntegriCloud