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
Nadezhda Ivanova
OpenLDAP
Commits
88e8caf3
Commit
88e8caf3
authored
Nov 22, 2003
by
Pierangelo Masarati
Browse files
fix tricky signed/unsigned comparison (ITS#2835)
parent
aba062ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/liblutil/passwd.c
View file @
88e8caf3
...
@@ -485,7 +485,7 @@ static int chk_ssha1(
...
@@ -485,7 +485,7 @@ static int chk_ssha1(
rc
=
lutil_b64_pton
(
passwd
->
bv_val
,
orig_pass
,
passwd
->
bv_len
);
rc
=
lutil_b64_pton
(
passwd
->
bv_val
,
orig_pass
,
passwd
->
bv_len
);
if
(
rc
<=
sizeof
(
SHA1digest
))
{
if
(
rc
<
0
||
(
unsigned
)
rc
<=
sizeof
(
SHA1digest
))
{
ber_memfree
(
orig_pass
);
ber_memfree
(
orig_pass
);
return
-
1
;
return
-
1
;
}
}
...
@@ -566,7 +566,7 @@ static int chk_smd5(
...
@@ -566,7 +566,7 @@ static int chk_smd5(
rc
=
lutil_b64_pton
(
passwd
->
bv_val
,
orig_pass
,
passwd
->
bv_len
);
rc
=
lutil_b64_pton
(
passwd
->
bv_val
,
orig_pass
,
passwd
->
bv_len
);
if
(
rc
<=
sizeof
(
MD5digest
))
{
if
(
rc
<
0
||
(
unsigned
)
rc
<=
sizeof
(
MD5digest
))
{
ber_memfree
(
orig_pass
);
ber_memfree
(
orig_pass
);
return
-
1
;
return
-
1
;
}
}
...
...
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