r18989: Fixes found by these two LDAP testsuites:
authorAndrew Bartlett <abartlet@samba.org>
Fri, 29 Sep 2006 04:45:15 +0000 (04:45 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:20:26 +0000 (14:20 -0500)
commit441a4f6262459dabfefd9bb12622ada9c007a60c
tree18b19413636a5ad1cc9d71db0a54073dcc93bf55
parent5b3c8cc036c1180c9e96d9aaacd3f2e0a83460e5
r18989: Fixes found by these two LDAP testsuites:
- http://www.ee.oulu.fi/research/ouspg/protos/testing/c06/ldapv3/
- http://gleg.net/protover_ldap_sample.shtml

Also fixes found by a subsequent audit of the code for similar issues.
source/ldap_server/ldap_backend.c
source/libcli/ldap/ldap.c
source/libcli/util/asn1.c