[OSy] Chyba v teste falloc

cermm cermmi at gmail.com
Sun Dec 2 13:04:20 CET 2007


Zdravim,
chcel by som upozornit na chybu v teste falloc1, pri testovani ci dany blok
lezi v pozadovanej oblasti.
Podmienka testujuca ci koniec bloku nelezi mimo, testuje namiesto konca
alokovaneho bloku zaciatok
nasledujuceho (riadok. 405).
if (
   (unsigned long) data < ALLOWED_RANGE_MIN ||
   (unsigned long) data + (count * FRAME_SIZE) > ALLOWED_RANGE_MAX
)

spravne by malo byt
if (
(unsigned long) data < ALLOWED_RANGE_MIN ||
(unsigned long) data + (count * FRAME_SIZE) - 1 > ALLOWED_RANGE_MAX
)

M.C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://d3s.mff.cuni.cz/pipermail/nswi004/attachments/20071202/6d57a9d9/attachment.html>


More information about the NSWI004 mailing list