Skip to content

Commit

Permalink
pdb_nds: Fix CID 1273401 Unused value
Browse files Browse the repository at this point in the history
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>
  • Loading branch information
vlendec authored and jrasamba committed Apr 7, 2018
1 parent e29eaa4 commit de48619
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions source3/passdb/pdb_nds.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,19 @@ static int berEncodeLoginData(
err = (ber_printf(requestBer, "}}", 0) < 0) ? LDAP_ENCODING_ERROR : 0;
}

if(putData)
{
if (!err) {
if (putData) {
/* BER Encode the the tag and data */
err = (ber_printf(requestBer, "oio}", utf8TagPtr, utf8TagSize, putDataLen, putData, putDataLen) < 0) ? LDAP_ENCODING_ERROR : 0;
}
else
{
err = (ber_printf(requestBer, "oio}", utf8TagPtr,
utf8TagSize, putDataLen, putData,
putDataLen) < 0)
? LDAP_ENCODING_ERROR : 0;
} else {
/* BER Encode the the tag */
err = (ber_printf(requestBer, "o}", utf8TagPtr, utf8TagSize) < 0) ? LDAP_ENCODING_ERROR : 0;
err = (ber_printf(requestBer, "o}", utf8TagPtr,
utf8TagSize) < 0)
? LDAP_ENCODING_ERROR : 0;
}
}

if (err)
Expand Down

0 comments on commit de48619

Please sign in to comment.