buffer: fix unintended unsigned overflow · nodejs/node@46f40cf · GitHub
Skip to content

Commit 46f40cf

Browse files
committed
buffer: fix unintended unsigned overflow
`offset` is user supplied variable and may be bigger than `ts_obj_length`. There is no need to subtract them and pass along, so just throw when the subtraction result would overflow. PR-URL: #7494 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent a528d0d commit 46f40cf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/node_buffer.cc

Lines changed: 3 additions & 3 deletions

0 commit comments

Comments
 (0)