You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As noted when @isaacy2012 was adding cartesian_power, the current implementation of size() for cartesian_product[_map] uses built-in multiplication in a fold expression, and could easily overflow:
As noted when @isaacy2012 was adding
cartesian_power
, the current implementation ofsize()
forcartesian_product[_map]
uses built-in multiplication in a fold expression, and could easily overflow:flux/include/flux/op/cartesian_base.hpp
Lines 219 to 227 in 85b016e
It should use
num::checked_mul()
instead to guard against UB.The text was updated successfully, but these errors were encountered: