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

[v10.x backport] fs: improve truncate length validation #21171

Closed
wants to merge 3 commits into from
Closed

[v10.x backport] fs: improve truncate length validation #21171

wants to merge 3 commits into from

Commits on Jun 6, 2018

  1. lib: add validateInteger() validator

    This allows validation of integers that are not int32 or uint32.
    
    PR-URL: #20851
    Fixes: #20844
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    cjihrig authored and codebytere committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    67c7c77 View commit details
    Browse the repository at this point in the history
  2. fs: add length validation to fs.truncate()

    This commit adds validation to the length parameter of
    fs.truncate(). Prior to this commit, passing a non-number would
    trigger a CHECK() in the binding layer.
    
    PR-URL: #20851
    Fixes: #20844
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    cjihrig authored and codebytere committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    4bc889d View commit details
    Browse the repository at this point in the history
  3. fs: don't limit ftruncate() length to 32 bits

    The length used by ftruncate() is 64 bits in the binding layer.
    This commit removes the 32 bit restriction in the JS layer.
    
    PR-URL: #20851
    Fixes: #20844
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    cjihrig authored and codebytere committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    f2f8375 View commit details
    Browse the repository at this point in the history