svn commit: samba r19803 - in branches/SAMBA_3_0/source/rpc_server: .

simo idra at samba.org
Mon Nov 20 14:35:05 GMT 2006


On Mon, 2006-11-20 at 13:39 +0000, vlendec at samba.org wrote:
> Author: vlendec
> Date: 2006-11-20 13:39:01 +0000 (Mon, 20 Nov 2006)
> New Revision: 19803
> 
> WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19803
> 
> Log:
> Fix problem reported by Chetan S: QueryInfoKey needs to report the max name
> length in *bytes* for UTF-16, not the string length. This got lost during the
> conversion.
> 
> This took a while to figure out :-)
> 
> Thanks to Chetan!
> 
> Volker
> 
> Modified:
>    branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c
> 
> 
> Changeset:
> Modified: branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c
> ===================================================================
> --- branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c	2006-11-20 05:56:01 UTC (rev 19802)
> +++ branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c	2006-11-20 13:39:01 UTC (rev 19803)
> @@ -190,7 +190,7 @@
>  	}
>  
>  	*maxnum   = num_values;
> -	*maxlen   = lenmax;
> +	*maxlen   = lenmax*2;
>  	*maxsize  = sizemax;
>  	
>  	TALLOC_FREE( values );


Not sure value may contain UTF8 strings or if the maxlen is just an
indication or have to be the exact length value. But in that case this
maybe led to a bigger value then the real string length in UTF16

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: idra at samba.org
http://samba.org



More information about the samba-technical mailing list