Bug 169527 - wrong allocation size in tmp filename allocations
Summary: wrong allocation size in tmp filename allocations
Keywords:
Status: CLOSED DUPLICATE of bug 150277
Alias: None
Product: Fedora
Classification: Fedora
Component: dos2unix
Version: 3
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: 2005-09-29 12:43 UTC by Wojciech Milek
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-29 12:46:31 UTC
Type: ---
Embargoed:


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

Description Wojciech Milek 2005-09-29 12:43:28 UTC
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 12:45:50 UTC
Created attachment 119414 [details]
Patch for this problem


This patch corrects wrong maloc call.

Comment 2 Tim Waugh 2005-09-29 12:46:31 UTC

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