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

neovim-unwrapped: fix byte index bounds checking #349230

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions pkgs/by-name/ne/neovim-unwrapped/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
, libvterm-neovim
, tree-sitter
, fetchurl
, fetchpatch
, buildPackages
, treesitter-parsers ? import ./treesitter-parsers.nix { inherit fetchurl; }
, CoreServices
Expand Down Expand Up @@ -82,6 +83,18 @@ in {
# necessary so that nix can handle `UpdateRemotePlugins` for the plugins
# it installs. See https://github.com/neovim/neovim/issues/9413.
./system_rplugin_manifest.patch

# FIXME: remove in the next release
# Fix byte index encoding bounds which were previously only checked
# against the UTF-8 length, whereas the default is UTF-16, which caused
# undefined behaviour.
# - https://github.com/neovim/neovim/pull/30747
# - https://github.com/nix-community/nixvim/issues/2390
(fetchpatch {
name = "fix-lsp-str_byteindex_enc-bounds-checking-30747.patch";
url = "https://patch-diff.githubusercontent.com/raw/neovim/neovim/pull/30747.patch";
hash = "sha256-2oNHUQozXKrHvKxt7R07T9YRIIx8W3gt8cVHLm2gYhg=";
})
];

dontFixCmake = true;
Expand Down