diff options
author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2018-04-13 16:13:55 +0300 |
---|---|---|
committer | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2019-09-11 21:08:04 +0300 |
commit | fc56798acabc8f3c4c5290178a22c4e551ef7bb3 (patch) | |
tree | 8b9cc3c418cbb2e0e5accc3c1ded5d8731d0573a /wscript_build.py | |
parent | 6e6ec331685c78584a818f524286670911e8b4af (diff) | |
download | mpv-fc56798acabc8f3c4c5290178a22c4e551ef7bb3.tar.bz2 mpv-fc56798acabc8f3c4c5290178a22c4e551ef7bb3.tar.xz |
js: correctness: use integer range checks
There were some cases where a js number (double) was blindly casted to
int or uint64, but that can be undefined behavior (out of range to int)
or wrong (negative to uint).
Now the code throws a js error if the value is out of range.
Additionally, commit ec625266 added these checks for the new hooks API,
but incorrectly tested int64 range rather than uint64. Fix this too.
Diffstat (limited to 'wscript_build.py')
0 files changed, 0 insertions, 0 deletions