vc.c: ber_printf/flatten rc==LBER_ERROR -> rc<0

This commit is contained in:
Hallvard Furuseth 2011-01-12 14:23:07 +00:00
parent 6a544b7193
commit 77f78f1d57

View file

@ -235,7 +235,7 @@ ldap_verify_credentials(LDAP *ld,
}
}
if (rc == LBER_ERROR) {
if (rc < 0) {
rc = ld->ld_errno = LDAP_ENCODING_ERROR;
goto done;
}
@ -259,14 +259,14 @@ ldap_verify_credentials(LDAP *ld,
rc = ber_printf(ber, /*"{"*/ "N}");
}
if (rc == LBER_ERROR) {
if (rc < 0) {
rc = ld->ld_errno = LDAP_ENCODING_ERROR;
goto done;
}
rc = ber_flatten2(ber, &reqdata, 0);
if (rc == LBER_ERROR) {
if (rc < 0) {
rc = ld->ld_errno = LDAP_ENCODING_ERROR;
goto done;
}