updated the 3.0 branch from the head branch - ready for alpha18
[samba.git] / source3 / libsmb / clilist.c
index 8b28e05a47581817f96d6c135866efa3b6a3dccd..17a759f9e39371455fdb39ea116e64425eddbfbb 100644 (file)
@@ -54,10 +54,14 @@ static int interpret_long_filename(struct cli_state *cli,
                        len = CVAL(p, 26);
                        p += 27;
                        p += clistr_align_in(cli, p, 0);
+                       /* the len+2 below looks strange but it is
+                          important to cope with the differences
+                          between win2000 and win9x for this call
+                          (tridge) */
                        p += clistr_pull(cli, finfo->name, p,
-                                   sizeof(finfo->name),
-                                   len
-                                   STR_TERMINATE);
+                                        sizeof(finfo->name),
+                                        len+2
+                                        STR_TERMINATE);
                        return PTR_DIFF(p, base);
 
                case 2: /* this is what OS/2 uses mostly */