Bug 187819 - dos2unix segmentation fault on long filenames
Summary: dos2unix segmentation fault on long filenames
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: dos2unix
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-04-03 19:26 UTC by Gabe da Silveira
Modified: 2008-08-02 23:40 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-15 12:12:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Gabe da Silveira 2006-04-03 19:26:55 UTC
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
/tmp/quickIdxProperty_sfarCommercialBuilding_1142689503
[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\ 
building.txt 
dos2unix: converting file listings-commercial building.txt to UNIX format ...
[root@www quickIdxProperty_sfarCommercialBuilding_1142689503]# 

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

3.1

How reproducible:

Easily reproducible on my system.  Unfortunately I haven't tested on any other systems...

Comment 1 Gabe da Silveira 2006-04-03 19:50:50 UTC
Upon further testing this is false.  The command works as long as I do not use an absolute path...  That 
is:

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 14:59:29 UTC
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.