Skip to content
Snippets Groups Projects
Commit 88e8caf3 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

fix tricky signed/unsigned comparison (ITS#2835)

parent aba062ee
No related branches found
No related tags found
No related merge requests found
......@@ -485,7 +485,7 @@ static int chk_ssha1(
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);
return -1;
}
......@@ -566,7 +566,7 @@ static int chk_smd5(
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);
return -1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment