]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commit
isofs: avoid undefined timezone sign extension
authorStefan Reinauer <stefan.reinauer@coreboot.org>
Thu, 21 May 2026 00:37:36 +0000 (17:37 -0700)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Sun, 31 May 2026 07:33:15 +0000 (00:33 -0700)
commit17c59f8f683050453f2338fea691131c6584d14c
treea67f72f2ca90162987181f8eb5285d6073ce0007
parent794c675d9d1a94c6cb8ab6a326f8692fc16fac25
isofs: avoid undefined timezone sign extension

make_date() sign-extends the ISO9660 timezone byte when the high
bit is set. (-1 << 8) shifts a negative signed value, which is
undefined behavior in C++.

Use ~0xff to build the same extension mask without relying on
that undefined shift.
isofs.cpp