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...
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.
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.