aboutsummaryrefslogtreecommitdiff
path: root/lib/xixanta/src/parser.rs
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-07-09 22:15:43 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2026-07-09 22:15:43 +0200
commit426aa0d30b9e708ccb4072a17ade49bf5a245d63 (patch)
tree6fc80919fed45dcad6e7369a94015101cc9e3310 /lib/xixanta/src/parser.rs
parent7b83a222ee52c579d127ec40701c57b5576ddf71 (diff)
downloadtools.nes-426aa0d30b9e708ccb4072a17ade49bf5a245d63.tar.gz
tools.nes-426aa0d30b9e708ccb4072a17ade49bf5a245d63.zip
Prevent out of bounds panics on range_to_human()
On range_to_human(), if the range is completely broken for some reason, we might get a start = 0 and end = 0. In this case, then we would get into an 'end - 1' computation for an 'usize', resulting in bad arithmetics. This can be avoided altogether if the 'start + 1' computation from the start of the function not only results to be equal, but also larger than 'end'. This, of course, doesn't make much sense, and it's most probably a bandaid; but it has been detected via fuzzy testing with wild inputs. Hence, it's fine if this function doesn't return a coherent string representation for deranged inputs. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'lib/xixanta/src/parser.rs')
0 files changed, 0 insertions, 0 deletions