Bug 169527 - wrong allocation size in tmp filename allocations
wrong allocation size in tmp filename allocations
Status: CLOSED DUPLICATE of bug 150277
Product: Fedora
Classification: Fedora
Component: dos2unix (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-29 08:43 EDT by Wojciech Milek
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-29 08:46:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for this problem (422 bytes, patch)
2005-09-29 08:45 EDT, Wojciech Milek
no flags Details | Diff

  None (edit)
Description Wojciech Milek 2005-09-29 08:43:28 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7

Description of problem:
I noticed that durring changing many files using dos2unix tools some files are not converted with message:

dos2unix: problems renaming './stcfg/cmd5528/d2utmpTBxaZb  ' to './stcfg/cmd5528/reg5528.h'
          output file remains in './stcfg/cmd5528/d2utmpTBxaZb'
dos2unix: problems converting file ./stcfg/cmd5528/reg5528.h


Temporary filename created by dos2unix contains some additional spaces or white chars. 


This problem is caused by wrong allocation size and if size of temporary filename string % 4 == 0 end of this string is overwriten by next allocation :-)
 

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

How reproducible:
Sometimes

Steps to Reproduce:
1. find . -name *.c - exec {} \;
2.
3.
  

Actual Results:  dos2unix: problems renaming './stcfg/cmd5528/d2utmpTBxaZb' to './stcfg/cmd5528/reg5528.h'
          output file remains in './stcfg/cmd5528/d2utmpTBxaZb'
dos2unix: problems converting file ./stcfg/cmd5528/reg5528.h



Expected Results:  no such messages

Additional info:
Comment 1 Wojciech Milek 2005-09-29 08:45:50 EDT
Created attachment 119414 [details]
Patch for this problem


This patch corrects wrong maloc call.
Comment 2 Tim Waugh 2005-09-29 08:46:31 EDT

*** This bug has been marked as a duplicate of 150277 ***

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