Bug 653102 - lesstif: memcpy with overlapping source/destination range (may break with glibc in F14/x86_64)
Summary: lesstif: memcpy with overlapping source/destination range (may break with gli...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lesstif
Version: 14
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-14 15:16 UTC by Ronald Wahl
Modified: 2012-02-02 14:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-02 14:36:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ronald Wahl 2010-11-14 15:16:23 UTC
Description of problem:
Since Fedora 14 calling memcpy() with overlapping source and destination ranges may produce incorrect results (which complies to the specification of memcpy).

I wrote a simple wrapper for memcpy to detect such cases and when starting ddd (which actually uses lesstif) it reports an unsafe memcpy call. Checking with valgrind (which detects such unsafe calls as well) verifies the problem.

The unsafe memcpy() call is in lib/Xm-2.1/Manager.c line 2014. It should be changed to memmove().

I'm not sure if there are more such calls hidden in the code...

Version-Release number of selected component (if applicable):
lesstif-0.95.2-1.fc12.x86_64

How reproducible:
Always

Steps to Reproduce:
1. valgrind ddd
2.
3.
  
Actual results:
Besides other strange stuff (probably also some false positives) it reports:
"Source and destination overlap in memcpy"

Expected results:
No "Source and destination overlap in memcpy" message.

Additional info:

Comment 1 Gwyn Ciesla 2012-02-02 14:36:20 UTC
Fedora 14 is End-of-Life, please reopen against a current release if this bug is still occurring.  Thank you!


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