Skip to content

Commit 59ee848

Browse files
committed
[System.DirectoryServices.Protocols] Fix overflow in ProtocolVersion on Big Endian
1 parent b091d4d commit 59ee848

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ public bool SecureSocketLayer
5757

5858
public int ProtocolVersion
5959
{
60-
get => GetPtrValueHelper(LdapOption.LDAP_OPT_VERSION).ToInt32();
61-
set => SetPtrValueHelper(LdapOption.LDAP_OPT_VERSION, new IntPtr(value));
60+
get => GetIntValueHelper(LdapOption.LDAP_OPT_VERSION);
61+
62+
set => SetIntValueHelper(LdapOption.LDAP_OPT_VERSION, value);
6263
}
6364

6465
public ReferralChasingOptions ReferralChasing

0 commit comments

Comments
 (0)