[Bug ada/12014] New: strcpy used with overlapping arguments

hermantenbrugge at home dot nl gcc-bugzilla@gcc.gnu.org
Thu Aug 21 17:45:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12014

           Summary: strcpy used with overlapping arguments
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hermantenbrugge at home dot nl
                CC: gcc-bugs at gcc dot gnu dot org

I just ran bounds-checking on the gcc-3.3.1 release. It produced an error in 
adadecode.c. The problem is that it contains code like:

strcpy (ada_name, ada_name + 5);
strcpy (tktoken, tktoken + 2);
strcpy (ada_name + k + 1, ada_name + k + 2);

All of these strcpy's are illegal because the source and destination pointer
overlap.



More information about the Gcc-bugs mailing list