GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: check for overflow when extending AliasedBufferBase · nodejs/node@1e76bc6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • aliased_buffer.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/aliased_buffer.h‎

Copy file name to clipboardExpand all lines: src/aliased_buffer.h
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ class AliasedBufferBase {
221221
const v8::HandleScope handle_scope(isolate_);
222222

223223
const size_t old_size_in_bytes = sizeof(NativeT) * count_;
224-
const size_t new_size_in_bytes = sizeof(NativeT) * new_capacity;
224+
const size_t new_size_in_bytes = MultiplyWithOverflowCheck(sizeof(NativeT),
225+
new_capacity);
225226

226227
// allocate v8 new ArrayBuffer
227228
v8::Local<v8::ArrayBuffer> ab = v8::ArrayBuffer::New(

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.