ps2raster calls strcpy with to and from pointer that overlap
|Target version:||Candidate for next bugfix release|
This is now illegal in OS X Mavericks and suddenly results in a crash. We need to avoid this situation and should check for other strcpy calls as well.
#2 Updated by Florian over 4 years ago
- Subject changed from ps2raster calls strcpy with to and from pointer being the same to ps2raster calls strcpy with to and from pointer that overlap
- Status changed from Closed to In Progress
Deleted the duplicate.
Note that this is not a Mavericks bug. This is a general issue because strcpy's behavior is undefined with overlapping strings: http://pubs.opengroup.org/onlinepubs/009695399/functions/strcpy.html.
Running GMT 4 tests through valgrind would probably indicate many of these problems.
#3 Updated by Paul over 4 years ago
Yes, it is not a "bug" but the sudden decision to disallow the overlapping strings. I understand the reasons (security) and I guess it is too much to ask to get a memo before they release libraries with the new behavior. So now we and others suddenly have a condition that crashes ps2raster under Mavericks, an unnecessary problem....