code-423n4 / 2021-05-yield-findings

0 stars 0 forks source link

function build could explicitly check that seriesId is not 0 #59

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

pauliax

Vulnerability details

Impact

It would be helpful if function build explicitly check that seriesId != bytes12(0). In practice, it is not possible to have a series with an id of 0, so this check will not pass: require (ilks[seriesId][ilkId] == true, "Ilk not added to series"); however, the error message is not very informative, thus I am suggesting adding an explicit check.

Recommended Mitigation Steps

require (seriesId != bytes12(0), "Series id is zero");

alcueca commented 3 years ago

Fix