8000 MNT: ensure pre-multiplication casting to prevent overflow · matplotlib/matplotlib@49f173d · GitHub
[go: up one dir, main page]

Skip to content

Commit 49f173d

Browse files
committed
MNT: ensure pre-multiplication casting to prevent overflow
1 parent 34d827c commit 49f173d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_path.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ bool convert_to_string(PathIterator &path,
12221222
clipped_t clipped(nan_removed, do_clip, clip_rect);
12231223
simplify_t simplified(clipped, simplify, path.simplify_threshold());
12241224

1225-
buffersize = path.total_vertices() * (precision + 5) * 4;
1225+
buffersize = ( 48B3 size_t) path.total_vertices() * (precision + 5) * 4;
12261226
if (buffersize == 0) {
12271227
return true;
12281228
}

0 commit comments

Comments
 (0)
0