svn commit: samba r7725 - in branches/SAMBA_4_0/source/libcli/ldap:
.
tridge at samba.org
tridge at samba.org
Sat Jun 18 13:15:09 GMT 2005
Author: tridge
Date: 2005-06-18 13:15:09 +0000 (Sat, 18 Jun 2005)
New Revision: 7725
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7725
Log:
fixed a bug with partial asn1 frames in the ldap client
Modified:
branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c
Changeset:
Modified: branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c 2005-06-18 12:48:42 UTC (rev 7724)
+++ branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c 2005-06-18 13:15:09 UTC (rev 7725)
@@ -156,6 +156,8 @@
/* try and decode - this will fail if we don't have a full packet yet */
while (asn1.ofs < asn1.length) {
struct ldap_message *msg = talloc(conn, struct ldap_message);
+ off_t saved_ofs = asn1.ofs;
+
if (msg == NULL) {
ldap_connection_dead(conn);
return;
@@ -164,6 +166,7 @@
if (ldap_decode(&asn1, msg)) {
ldap_match_message(conn, msg);
} else {
+ asn1.ofs = saved_ofs;
talloc_free(msg);
break;
}
More information about the samba-cvs
mailing list