svn commit: samba r5541 - branches/SAMBA_3_0/source/registry
branches/SAMBA_3_0/source/utils trunk/source/registry
trunk/source/utils
gd at samba.org
gd at samba.org
Thu Feb 24 17:00:25 GMT 2005
Author: gd
Date: 2005-02-24 17:00:24 +0000 (Thu, 24 Feb 2005)
New Revision: 5541
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5541
Log:
Fix crash bug in the client-spoolss enumdataex-call.
With Windows2003 it's perfectly legal to receive no data when querying a
value-less subkey. Found while migrating printer settings.
Guenther
Modified:
branches/SAMBA_3_0/source/registry/reg_objects.c
branches/SAMBA_3_0/source/utils/net_rpc_printer.c
trunk/source/registry/reg_objects.c
trunk/source/utils/net_rpc_printer.c
Changeset:
Modified: branches/SAMBA_3_0/source/registry/reg_objects.c
===================================================================
--- branches/SAMBA_3_0/source/registry/reg_objects.c 2005-02-24 15:21:46 UTC (rev 5540)
+++ branches/SAMBA_3_0/source/registry/reg_objects.c 2005-02-24 17:00:24 UTC (rev 5541)
@@ -113,7 +113,7 @@
void regval_ctr_init( REGVAL_CTR *ctr )
{
- if ( !ctr->ctx )
+ if ( ctr && !ctr->ctx )
ctr->ctx = talloc_init("regval_ctr_init for ctr %p", ctr);
}
Modified: branches/SAMBA_3_0/source/utils/net_rpc_printer.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net_rpc_printer.c 2005-02-24 15:21:46 UTC (rev 5540)
+++ branches/SAMBA_3_0/source/utils/net_rpc_printer.c 2005-02-24 17:00:24 UTC (rev 5541)
@@ -980,7 +980,7 @@
/* enumprinterdataex call */
result = cli_spoolss_enumprinterdataex(
- cli, mem_ctx, 0, &needed, hnd, keyname, NULL);
+ cli, mem_ctx, 0, &needed, hnd, keyname, ctr);
if (W_ERROR_V(result) == W_ERROR_V(WERR_MORE_DATA))
result = cli_spoolss_enumprinterdataex(
Modified: trunk/source/registry/reg_objects.c
===================================================================
--- trunk/source/registry/reg_objects.c 2005-02-24 15:21:46 UTC (rev 5540)
+++ trunk/source/registry/reg_objects.c 2005-02-24 17:00:24 UTC (rev 5541)
@@ -113,7 +113,7 @@
void regval_ctr_init( REGVAL_CTR *ctr )
{
- if ( !ctr->ctx )
+ if ( ctr && !ctr->ctx )
ctr->ctx = talloc_init("regval_ctr_init for ctr %p", ctr);
}
Modified: trunk/source/utils/net_rpc_printer.c
===================================================================
--- trunk/source/utils/net_rpc_printer.c 2005-02-24 15:21:46 UTC (rev 5540)
+++ trunk/source/utils/net_rpc_printer.c 2005-02-24 17:00:24 UTC (rev 5541)
@@ -980,7 +980,7 @@
/* enumprinterdataex call */
result = cli_spoolss_enumprinterdataex(
- cli, mem_ctx, 0, &needed, hnd, keyname, NULL);
+ cli, mem_ctx, 0, &needed, hnd, keyname, ctr);
if (W_ERROR_V(result) == W_ERROR_V(WERR_MORE_DATA))
result = cli_spoolss_enumprinterdataex(
More information about the samba-cvs
mailing list