File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -163,8 +163,14 @@ void HMPImporter::ValidateHeader_HMP457() {
163
163
" 120 bytes, this file is smaller)" );
164
164
}
165
165
166
+ if (!std::isfinite (pcHeader->ftrisize_x ) || !std::isfinite (pcHeader->ftrisize_y ))
167
+ throw DeadlyImportError (" Size of triangles in either x or y direction is not finite" );
168
+
166
169
if (!pcHeader->ftrisize_x || !pcHeader->ftrisize_y )
167
- throw DeadlyImportError (" Size of triangles in either x or y direction is zero" );
170
+ throw DeadlyImportError (" Size of triangles in either x or y direction is zero" );
171
+
172
+ if (!std::isfinite (pcHeader->fnumverts_x ))
173
+ throw DeadlyImportError (" Number of triangles in x direction is not finite" );
168
174
169
175
if (pcHeader->fnumverts_x < 1 .0f || (pcHeader->numverts / pcHeader->fnumverts_x ) < 1 .0f )
170
176
throw DeadlyImportError (" Number of triangles in either x or y direction is zero" );
You can’t perform that action at this time.
0 commit comments