Skip to content

Commit f2a0261

Browse files
committed
Use size_t to avoid overflow in alloc_sblock_pattern_lookup()
Previously used int which would overflow at large channel widths (e.g. W=900).
1 parent e689204 commit f2a0261

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vpr/SRC/route/rr_graph2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2109,7 +2109,7 @@ short ******alloc_sblock_pattern_lookup(
21092109

21102110
/* Alloc each list of pointers in one go. items is a running product that increases
21112111
* with each new dimension of the matrix. */
2112-
int items = 1;
2112+
size_t items = 1;
21132113
items *= (L_nx + 1);
21142114
short ******i_list = (short ******) my_malloc(sizeof(short *****) * items);
21152115
items *= (L_ny + 1);

0 commit comments

Comments
 (0)