aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-18 07:08:31 +0800
committerGitHub <noreply@github.com>2023-06-18 07:08:31 +0800
commit7e301ed5b9f72a98086c7004d090ad9aef137485 (patch)
tree5a9561e5e2059e54b0a27f4b5ba3d5245438a16c
parentc07dceba335c56c9a356395ad0d1e5a14d416752 (diff)
downloadrneovim-7e301ed5b9f72a98086c7004d090ad9aef137485.tar.gz
rneovim-7e301ed5b9f72a98086c7004d090ad9aef137485.tar.bz2
rneovim-7e301ed5b9f72a98086c7004d090ad9aef137485.zip
vim-patch:9.0.1638: crypt tests hang and cause memory errors (#24053)
Problem: crypt tests hang and cause memory errors Solution: Move variable to start of function. https://github.com/vim/vim/commit/438d0c5e58aa475179ade9a1b99013733c5b8f06 N/A patches for version.c: vim-patch:9.0.1639: build failure without the crypt feature Problem: Build failure without the crypt feature. Solution: Adjust #ifdefs https://github.com/vim/vim/commit/bc385a150f9d812bb3e54ff0d5db75d3c6c3bb43 vim-patch:9.0.1640: compiler warning for unused variables without crypt feature Problem: Compiler warning for unused variables without the crypt feature. Solution: Adjust #ifdefs https://github.com/vim/vim/commit/7f29122c8ce2ca224d21abbaeb35e38bc354d95d Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--src/nvim/fileio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 475415272a..e22bb609b6 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -990,7 +990,8 @@ retry:
}
} else {
// Read bytes from the file.
- size = read_eintr(fd, ptr, (size_t)size);
+ size_t read_size = (size_t)size;
+ size = read_eintr(fd, ptr, read_size);
}
if (size <= 0) {