Patch 9.0.1638 (after 9.0.1637)
Problem: crypt tests hang and cause memory errors
Solution: Move variable to start of function.
Files: src/fileio.c
*** ../vim-9.0.1637/src/fileio.c 2023-06-16 21:42:02.380360392 +0100
--- src/fileio.c 2023-06-17 14:56:20.386925633 +0100
***************
*** 218,223 ****
--- 218,224 ----
int using_b_ffname;
int using_b_fname;
static char *msg_is_a_directory = N_("is a directory");
+ int eof = FALSE;
#ifdef FEAT_SODIUM
int may_need_lseek = FALSE;
#endif
***************
*** 1222,1228 ****
size -= conv_restlen;
}
- int eof = FALSE;
if (read_buffer)
{
/*
--- 1223,1228 ----
***************
*** 1306,1313 ****
{
// set size to 8K + Sodium Crypt Metadata
size = WRITEBUFSIZE + crypt_get_max_header_len()
! + crypto_secretstream_xchacha20poly1305_HEADERBYTES
! + crypto_secretstream_xchacha20poly1305_ABYTES;
may_need_lseek = TRUE;
}
--- 1306,1313 ----
{
// set size to 8K + Sodium Crypt Metadata
size = WRITEBUFSIZE + crypt_get_max_header_len()
! + crypto_secretstream_xchacha20poly1305_HEADERBYTES
! + crypto_secretstream_xchacha20poly1305_ABYTES;
may_need_lseek = TRUE;
}
***************
*** 1328,1338 ****
}
}
# endif
! eof = size;
! size = read_eintr(fd, ptr, size);
filesize_count += size;
// hit end of file
! eof = (size < eof || filesize_count == filesize_disk);
}
#ifdef FEAT_CRYPT
--- 1328,1338 ----
}
}
# endif
! long read_size = size;
! size = read_eintr(fd, ptr, read_size);
filesize_count += size;
// hit end of file
! eof = (size < read_size || filesize_count == filesize_disk);
}
#ifdef FEAT_CRYPT
*** ../vim-9.0.1637/src/version.c 2023-06-16 21:42:02.380360392 +0100
--- src/version.c 2023-06-17 14:53:56.447093657 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1638,
/**/
--
hundred-and-one symptoms of being an internet addict:
188. You purchase a laptop so you can surf while sitting on the can.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///