fixed shortname length in trans2 list
authorAndrew Tridgell <tridge@samba.org>
Fri, 24 Aug 2001 04:53:39 +0000 (04:53 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 24 Aug 2001 04:53:39 +0000 (04:53 +0000)
source/libsmb/clilist.c

index 6368674488c46fd245c7d2566002e539ea72954b..562e1710d3baec195d3a86360dccff6bac6a142d 100644 (file)
@@ -71,6 +71,7 @@ static int interpret_long_filename(struct cli_state *cli,
                        finfo->mode = CVAL(p,24);
                        len = CVAL(p, 30);
                        p += 31;
+                       /* check for unisys! */
                        p += clistr_pull(cli, finfo->name, p,
                                         sizeof(finfo->name),
                                         len, 
@@ -114,7 +115,7 @@ static int interpret_long_filename(struct cli_state *cli,
                                if (p[1] == 0 && namelen > 1) flags |= STR_UNICODE;
                                clistr_pull(cli, finfo->short_name, p,
                                            sizeof(finfo->short_name),
-                                           24, flags);
+                                           slen, flags);
                        }
                        p += 24; /* short name? */        
                        clistr_pull(cli, finfo->name, p,