ramble ramble

master
q3k 2012-05-01 08:11:49 +00:00
parent 32d161b51e
commit 9e3f4a9eb1
1 changed files with 2 additions and 1 deletions

View File

@ -112,7 +112,8 @@ int ldap_uid_from_dn(char *DN, char *UIDOut)
int ValueLength = KeyPairLength - KeyLength - 1;
char *Value = KeyPairSplit + 1;
if (strncmp(Key, "uid", KeyLength > 3 ? 3 : KeyLength) == 0)
if (KeyLength == 3 && strncmp(Key, "uid", KeyLength) == 0)
{
memcpy(UIDOut, Value, ValueLength);
UIDOut[ValueLength] = 0;