Skip to content

Commit

Permalink
fix UB on bf_set
Browse files Browse the repository at this point in the history
  • Loading branch information
chqrlie committed Mar 3, 2024
1 parent bb56b4b commit 20670e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libbf.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ int bf_set(bf_t *r, const bf_t *a)
}
r->sign = a->sign;
r->expn = a->expn;
memcpy(r->tab, a->tab, a->len * sizeof(limb_t));
memcpy_no_ub(r->tab, a->tab, a->len * sizeof(limb_t));
return 0;
}

Expand Down

0 comments on commit 20670e4

Please sign in to comment.