Unicode bugs still with Win2K (PATCH#517)

Jeremy Allison jra at samba.org
Fri Sep 14 11:48:02 GMT 2001


Alan,

	I'm looking at your patch :

--- nttrans.c           Tue Jul 17 23:34:59 2001
+++ nttrans.c           Tue Jul 17 23:35:51 2001
@@ -301,7 +301,8 @@
    * the end here.
    */

-  if((data_len == 1) || (inbuf[data_offset] == '\0')) {
+      if((data_len - fname_len == 1) || (inbuf[data_offset] == '\0')
+           || ((inbuf[data_offset+1] == '\\') && (inbuf[data_offset+2] == '\0'))) {
     /*
      * Ensure that the data offset is aligned
      * on a 2 byte boundary - add one if not.

and it doesn't seem right. In the code you sent, data_len is == 1 already
(remember, get_filename_transact is called with the  data_len parameter set
to total_parameter_count - 53 - fname_len), so your patch would not detect
this. I think we need some better heuristics to detect this. Do you have
other examples of these packets I can look at ?

Jeremy.




More information about the samba-technical mailing list