Skip to content

Commit

Permalink
Fix an overflow if MONO_ZERO_LEN_ARRAY is not 0. Fixes mono#13233.
Browse files Browse the repository at this point in the history
  • Loading branch information
vargaz committed Jul 18, 2013
1 parent e19fa79 commit ff23e80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mono/mini/mini.c
Original file line number Diff line number Diff line change
Expand Up @@ -3759,7 +3759,7 @@ mono_save_seq_point_info (MonoCompile *cfg)
if (!cfg->seq_points)
return;

info = g_malloc0 (sizeof (MonoSeqPointInfo) + (cfg->seq_points->len - MONO_ZERO_LEN_ARRAY) * sizeof (SeqPoint));
info = g_malloc0 (sizeof (MonoSeqPointInfo) + (cfg->seq_points->len * sizeof (SeqPoint)));
info->len = cfg->seq_points->len;
for (i = 0; i < cfg->seq_points->len; ++i) {
SeqPoint *sp = &info->seq_points [i];
Expand Down

0 comments on commit ff23e80

Please sign in to comment.