Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
d54548b9
Commit
d54548b9
authored
Jan 19, 2003
by
Luke Howard
Browse files
Use strtol() not strtoul() in integerBit{And,Or}Match matching rules
parent
8866875e
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/schema_init.c
View file @
d54548b9
...
@@ -3506,7 +3506,7 @@ integerBitAndMatch(
...
@@ -3506,7 +3506,7 @@ integerBitAndMatch(
long
lValue
,
lAssertedValue
;
long
lValue
,
lAssertedValue
;
/* safe to assume integers are NUL terminated? */
/* safe to assume integers are NUL terminated? */
lValue
=
strto
u
l
(
value
->
bv_val
,
NULL
,
10
);
lValue
=
strtol
(
value
->
bv_val
,
NULL
,
10
);
if
((
lValue
==
LONG_MIN
||
lValue
==
LONG_MAX
)
&&
errno
==
ERANGE
)
{
if
((
lValue
==
LONG_MIN
||
lValue
==
LONG_MAX
)
&&
errno
==
ERANGE
)
{
return
LDAP_CONSTRAINT_VIOLATION
;
return
LDAP_CONSTRAINT_VIOLATION
;
}
}
...
@@ -3534,7 +3534,7 @@ integerBitOrMatch(
...
@@ -3534,7 +3534,7 @@ integerBitOrMatch(
long
lValue
,
lAssertedValue
;
long
lValue
,
lAssertedValue
;
/* safe to assume integers are NUL terminated? */
/* safe to assume integers are NUL terminated? */
lValue
=
strto
u
l
(
value
->
bv_val
,
NULL
,
10
);
lValue
=
strtol
(
value
->
bv_val
,
NULL
,
10
);
if
((
lValue
==
LONG_MIN
||
lValue
==
LONG_MAX
)
&&
errno
==
ERANGE
)
{
if
((
lValue
==
LONG_MIN
||
lValue
==
LONG_MAX
)
&&
errno
==
ERANGE
)
{
return
LDAP_CONSTRAINT_VIOLATION
;
return
LDAP_CONSTRAINT_VIOLATION
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment