From: <hez...@us...> - 2009-09-21 21:02:49
|
Revision: 10450 http://plplot.svn.sourceforge.net/plplot/?rev=10450&view=rev Author: hezekiahcarty Date: 2009-09-21 21:02:38 +0000 (Mon, 21 Sep 2009) Log Message: ----------- Check for nan (not a number) values in plcol1 to avoid potential segfaults Modified Paths: -------------- trunk/src/plctrl.c Modified: trunk/src/plctrl.c =================================================================== --- trunk/src/plctrl.c 2009-09-21 19:22:41 UTC (rev 10449) +++ trunk/src/plctrl.c 2009-09-21 21:02:38 UTC (rev 10450) @@ -161,7 +161,7 @@ plabort("plcol1: Please call plinit first"); return; } - if (col1 < 0 || col1 > 1) { + if (col1 < 0 || col1 > 1 || isnan(col1)) { char buffer[BUFFER_SIZE]; snprintf(buffer, BUFFER_SIZE, "plcol1: Invalid color map position: %f", (PLFLT) col1); plabort(buffer); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |