This adds checks for invalid values when reading an array of bools (see #7). This is necessary to avoid undefined behavior in the case of corrupted or malicious input.
Instead of returning an error on values other than 0x00 or 0x01, we could interpret other values as true (i.e. overwrite them with 0x01). For the time being, I prefer the more conservative approach of returning an error, but if anyone has a reason to allow values other than 0x00 or 0x01, feel free to create an issue.
This adds checks for invalid values when reading an array of
bool
s (see #7). This is necessary to avoid undefined behavior in the case of corrupted or malicious input.Instead of returning an error on values other than
0x00
or0x01
, we could interpret other values astrue
(i.e. overwrite them with0x01
). For the time being, I prefer the more conservative approach of returning an error, but if anyone has a reason to allow values other than0x00
or0x01
, feel free to create an issue.