bug in HEAD: init_unistr2_from_unistr

Gerald Carter gcarter at valinux.com
Sat Aug 5 19:08:20 GMT 2000


Jeremy Allison wrote:
> 
> > memcpy(to->buffer,from->buffer,to->uni_str_len*sizeof(uint16));
> >
> Be careful of this (I'm at home at the moment so can't easily
> check stuff). It looks like you may be believing the client
> when it gives you a length.
> 
> That would be a mistake :-).

JF is right on this.  I've cleaned it up.  The length 
has been manually determined previously.  The main use for this
is to convert from something like PRINTER_INFO_3{} to
SPOOL_PRINTER_INFO_LEVEL_3 where fields are UNISTR in one
and converted to UNSITR2 in the latter struct.



jerry
----------------------------------------------------------------------
   /\  Gerald (Jerry) Carter                     Professional Services
 \/    http://www.valinux.com  VA Linux Systems    gcarter at valinux.com
       http://www.samba.org       SAMBA Team           jerry at samba.org
       http://www.eng.auburn.edu/~cartegw

       "...a hundred billion castaways looking for a home."
                                - Sting "Message in a Bottle" ( 1979 )




More information about the samba-technical mailing list