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 — tls: avoid external memory leak on invalid protocol versions · nodejs/node@377e8ce

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/tls
    • common.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/tls/common.js‎

Copy file name to clipboardExpand all lines: lib/internal/tls/common.js
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ function SecureContext(secureProtocol, secureOptions, minVersion, maxVersion) {
8282
throw new ERR_TLS_PROTOCOL_VERSION_CONFLICT(maxVersion, secureProtocol);
8383
}
8484

85+
const minV = toV('minimum', minVersion, tls.DEFAULT_MIN_VERSION);
86+
const maxV = toV('maximum', maxVersion, tls.DEFAULT_MAX_VERSION);
87+
8588
this.context = new NativeSecureContext();
86-
this.context.init(secureProtocol,
87-
toV('minimum', minVersion, tls.DEFAULT_MIN_VERSION),
88-
toV('maximum', maxVersion, tls.DEFAULT_MAX_VERSION));
89+
this.context.init(secureProtocol, minV, maxV);
8990

9091
if (secureOptions) {
9192
validateInteger(secureOptions, 'secureOptions');

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.