buffer: add type check in bidirectionalIndexOf by Flarna · Pull Request #32770 · nodejs/node

@Flarna

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 added the buffer

Issues and PRs related to the buffer subsystem.

label

Apr 10, 2020

addaleax

@Flarna

addaleax

BridgeAR

@Flarna

@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

ZYSzys

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 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>

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>