Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer: add type check in bidirectionalIndexOf #32770

Closed

Conversation

Flarna
Copy link
Member

@Flarna Flarna commented Apr 10, 2020

Add a type check in bidirectionalIndexOf to avoid using something else as Buffer. This may happen if e.g. lastIndexOf is called with invalid this.

fixes: #32753
fixes: #32747

Add a type check in bidirectionalIndexOf to avoid using something else
as Buffer. This may happen if e.g. lastIndexOf is called with invalid
this.
@nodejs-github-bot nodejs-github-bot added the buffer Issues and PRs related to the buffer subsystem. label Apr 10, 2020
lib/buffer.js Outdated Show resolved Hide resolved
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % comment

lib/buffer.js Outdated Show resolved Hide resolved
@nodejs-github-bot
Copy link
Collaborator

@Flarna Flarna added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 12, 2020
lib/buffer.js Show resolved Hide resolved
Flarna added a commit that referenced this pull request Apr 13, 2020
Add a type check in bidirectionalIndexOf to avoid using something else
as Buffer. This may happen if e.g. lastIndexOf is called with invalid
this.

PR-URL: #32770
Fixes: #32753
Fixes: #32747
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
@Flarna
Copy link
Member Author

Flarna commented Apr 13, 2020

Landed in aa34465

@Flarna Flarna closed this Apr 13, 2020
@Flarna Flarna deleted the fix-buffer-indexof branch April 13, 2020 21:24
BethGriggs pushed a commit that referenced this pull request Apr 14, 2020
Add a type check in bidirectionalIndexOf to avoid using something else
as Buffer. This may happen if e.g. lastIndexOf is called with invalid
this.

PR-URL: #32770
Fixes: #32753
Fixes: #32747
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
targos pushed a commit to targos/node that referenced this pull request Apr 25, 2020
Add a type check in bidirectionalIndexOf to avoid using something else
as Buffer. This may happen if e.g. lastIndexOf is called with invalid
this.

PR-URL: nodejs#32770
Fixes: nodejs#32753
Fixes: nodejs#32747
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
BridgeAR pushed a commit that referenced this pull request Apr 28, 2020
Add a type check in bidirectionalIndexOf to avoid using something else
as Buffer. This may happen if e.g. lastIndexOf is called with invalid
this.

PR-URL: #32770
Fixes: #32753
Fixes: #32747
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
@BridgeAR BridgeAR mentioned this pull request Apr 28, 2020
targos pushed a commit that referenced this pull request Apr 28, 2020
Add a type check in bidirectionalIndexOf to avoid using something else
as Buffer. This may happen if e.g. lastIndexOf is called with invalid
this.

PR-URL: #32770
Fixes: #32753
Fixes: #32747
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. buffer Issues and PRs related to the buffer subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'buffer.Buffer.prototype.lastIndexOf' results in an abort 'zlib.gzip' results in an abort
5 participants