From: <ai...@us...> - 2010-12-17 08:55:23
|
Revision: 11377 http://plplot.svn.sourceforge.net/plplot/?rev=11377&view=rev Author: airwin Date: 2010-12-17 08:55:17 +0000 (Fri, 17 Dec 2010) Log Message: ----------- Revert previous commit so that internal truncation limit for filename length returned by plgfnam is changed back 255 characters to 79 characters. The reason for this reversion is some of the bindings (e.g., Tcl) still assume less than 255 characters so there is an automatical buffer overflow unless the limit is changed back to what it was. In any case, there is what I think is a better proposal for dealing with this 80-character total filepath length issue being discussed on list right now. Modified Paths: -------------- trunk/src/plcore.c Modified: trunk/src/plcore.c =================================================================== --- trunk/src/plcore.c 2010-12-17 07:55:56 UTC (rev 11376) +++ trunk/src/plcore.c 2010-12-17 08:55:17 UTC (rev 11377) @@ -3632,15 +3632,15 @@ { if ( fnam == NULL ) { - plabort( "filename string must be preallocated to >=256 bytes" ); + plabort( "filename string must be preallocated to >=80 bytes" ); return; } *fnam = '\0'; if ( plsc->FileName != NULL ) { - strncpy( fnam, plsc->FileName, 255 ); - fnam[255] = '\0'; + strncpy( fnam, plsc->FileName, 79 ); + fnam[79] = '\0'; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |