git.samba.org
/
metze
/
heimdal
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a27427
)
catch underflow/overflow errors
author
Love Hörnquist Åstrand
<lha@kth.se>
Fri, 27 Feb 2009 03:27:21 +0000
(
03:27
+0000)
committer
Love Hörnquist Åstrand
<lha@kth.se>
Fri, 27 Feb 2009 03:27:21 +0000
(
03:27
+0000)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24836
ec53bebd
-3082-4978-b11e-
865c3cabbd6b
lib/krb5/verify_krb5_conf.c
patch
|
blob
|
history
diff --git
a/lib/krb5/verify_krb5_conf.c
b/lib/krb5/verify_krb5_conf.c
index 3e21bb7d5bdb26dbabe3486204aa1aa2d069158c..9a5bb01d24f4b5cc0d87078a9ebac1b5467c49ce 100644
(file)
--- a/
lib/krb5/verify_krb5_conf.c
+++ b/
lib/krb5/verify_krb5_conf.c
@@
-88,9
+88,15
@@
check_time(krb5_context context, const char *path, char *data)
static int
check_numeric(krb5_context context, const char *path, char *data)
{
- long
int
v;
+ long v;
char *end;
v = strtol(data, &end, 0);
+
+ if ((v == LONG_MIN || v == LONG_MAX) && errno != 0) {
+ krb5_warnx(context, "%s: over/under flow for \"%s\"",
+ path, data);
+ return 1;
+ }
if(*end != '\0') {
krb5_warnx(context, "%s: failed to parse \"%s\" as a number",
path, data);