Revision: 64387
http://sourceforge.net/p/brlcad/code/64387
Author: starseeker
Date: 2015-03-13 01:25:43 +0000 (Fri, 13 Mar 2015)
Log Message:
-----------
Check for error cases
Modified Paths:
--------------
brlcad/trunk/src/libbrep/shape_recognition_cylinder.cpp
Modified: brlcad/trunk/src/libbrep/shape_recognition_cylinder.cpp
===================================================================
--- brlcad/trunk/src/libbrep/shape_recognition_cylinder.cpp 2015-03-13
01:15:41 UTC (rev 64386)
+++ brlcad/trunk/src/libbrep/shape_recognition_cylinder.cpp 2015-03-13
01:25:43 UTC (rev 64387)
@@ -755,6 +755,9 @@
ON_3dPoint ip1 = ON_LinePlaneIntersect(line, cyl_planes[0]);
ON_3dPoint ip2 = ON_LinePlaneIntersect(line, cyl_planes[1]);
+ if (ip1.x > ON_DBL_MAX - SMALL_FASTF || ip1.x < -ON_DBL_MAX
+ SMALL_FASTF) return 1;
+ if (ip2.x > ON_DBL_MAX - SMALL_FASTF || ip2.x < -ON_DBL_MAX
+ SMALL_FASTF) return 1;
+
// Define the cylinder.
struct subbrep_object_data *cyl_obj;
BU_GET(cyl_obj, struct subbrep_object_data);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits