Revision: 48527
http://brlcad.svn.sourceforge.net/brlcad/?rev=48527&view=rev
Author: erikgreenwald
Date: 2012-01-12 17:06:48 +0000 (Thu, 12 Jan 2012)
Log Message:
-----------
test I1 values. Cov1483
Modified Paths:
--------------
brlcad/trunk/src/liboptical/photonmap.c
Modified: brlcad/trunk/src/liboptical/photonmap.c
===================================================================
--- brlcad/trunk/src/liboptical/photonmap.c 2012-01-12 16:58:28 UTC (rev
48526)
+++ brlcad/trunk/src/liboptical/photonmap.c 2012-01-12 17:06:48 UTC (rev
48527)
@@ -1204,7 +1204,7 @@
return 0;
}
ret = fread(&I1, sizeof(int), 1, FH);
- if (ret != 1) {
+ if (ret != 1 || I1 < 0 || I1 > INT_MAX) {
bu_log("Error reading irradiance cache file (map type)\n");
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits