Bug 388 - coredump on smbclient tar restore long file names
Summary: coredump on smbclient tar restore long file names
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: smbclient (show other bugs)
Version: 3.0.0preX
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Gerald (Jerry) Carter
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-02 08:54 UTC by Craig Barratt
Modified: 2005-11-14 09:27 UTC (History)
0 users

See Also:


Attachments
proposed patch (551 bytes, patch)
2003-09-02 08:55 UTC, Craig Barratt
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Barratt 2003-09-02 08:54:39 UTC
When restoring a tar file using smbclient a core dump occurs when
there are long file names (ie: >= 100 length names, using the
@LongLink dummy record convention).

When encountering the "/./@LongLink" header, get_longfilename() is
called.  But it allocates space using strlen(finfo.name), which
at this point is "././@LongLink" or similar, rather than finfo.size,
which is the real length of the long file name.

The attached patch replaces strlen(finfo.name) with finfo.size.  In fact,
the code was this way in 2.2.3 (haven't checked later 2.2.x releases).
Comment 1 Craig Barratt 2003-09-02 08:55:12 UTC
Created attachment 118 [details]
proposed patch
Comment 2 Jeremy Allison 2003-09-11 18:25:55 UTC
Patch looks good - applied & thanks !
Jeremy.
Comment 3 Gerald (Jerry) Carter 2005-02-07 09:06:00 UTC
originally reported against one of the 3.0.0rc[1-4] releases.
Cleaning up non-production versions.
Comment 4 Gerald (Jerry) Carter 2005-08-24 10:23:27 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.
Comment 5 Gerald (Jerry) Carter 2005-11-14 09:27:26 UTC
database cleanup