Bug 187819 - dos2unix segmentation fault on long filenames
dos2unix segmentation fault on long filenames
Product: Fedora
Classification: Fedora
Component: dos2unix (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2006-04-03 15:26 EDT by Gabe da Silveira
Modified: 2008-08-02 19:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-12-15 07:12:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Gabe da Silveira 2006-04-03 15:26:55 EDT
Description of problem:

dos2unix segfaults on long filenames.  I believe this is due to a recent patch, as we had a script running 
for years that broke when we had to recently re-install the latest version of Fedora Core.  I'm not sure 
how recently or how frequently dos2unix itself has been patched.

Here is a transcript.  As you can see dos2unix fails when given the full path to the file but works fine 
when given the relative path.  I believe this is due to filename length.

[root@www quickIdxProperty_sfarCommercialBuilding_1142689503]# pwd
[root@www quickIdxProperty_sfarCommercialBuilding_1142689503]# ls
listings-commercial building.txt
[root@www quickIdxProperty_sfarCommercialBuilding_1142689503]# dos2unix /tmp/
quickIdxProperty_sfarCommercialBuilding_1142689503/listings-commercial\ building.txt
dos2unix: converting file /tmp/quickIdxProperty_sfarCommercialBuilding_1142689503/listings-
commercial building.txt to UNIX format ...
Segmentation fault
[root@www quickIdxProperty_sfarCommercialBuilding_1142689503]# dos2unix listings-commercial\ 
dos2unix: converting file listings-commercial building.txt to UNIX format ...
[root@www quickIdxProperty_sfarCommercialBuilding_1142689503]# 

Version-Release number of selected component (if applicable):


How reproducible:

Easily reproducible on my system.  Unfortunately I haven't tested on any other systems...
Comment 1 Gabe da Silveira 2006-04-03 15:50:50 EDT
Upon further testing this is false.  The command works as long as I do not use an absolute path...  That 

cd /
dos2unix tmp/
quickIdxProperty_sfarCommercialBuilding_1142689503/listings-commercial\ building.txt

works, whereas 

dos2unix /dos2unix /tmp/
quickIdxProperty_sfarCommercialBuilding_1142689503/listings-commercial\ building.txt

does not work. unix2dos does not suffer from this problem.
Comment 2 Tim Waugh 2006-07-10 10:59:29 EDT
Are you still seeing this problem?  If so, please show me the output of 'rpm -q
dos2unix' so that I can see which release you're using.

Note You need to log in before you can comment on or make changes to this bug.