The buffer used in LDAPCodec had a limit on the maximum size of a BER element
Description
The buffer used in LDAPCodec had a limit on the maximum size of a BER element. However this required the BER element to be processed first before the buffer size was checked. This allowed a large buffer to still be allocated which may lead to denial of service.