mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 01:46:29 +00:00
chore(nvim_paste): assert the correct String (#17752)
This commit is contained in:
@@ -1328,7 +1328,7 @@ Boolean nvim_paste(String data, Boolean crlf, Integer phase, Error *err)
|
|||||||
if (!cancel && !(State & CMDLINE)) { // Dot-repeat.
|
if (!cancel && !(State & CMDLINE)) { // Dot-repeat.
|
||||||
for (size_t i = 0; i < lines.size; i++) {
|
for (size_t i = 0; i < lines.size; i++) {
|
||||||
String s = lines.items[i].data.string;
|
String s = lines.items[i].data.string;
|
||||||
assert(data.size <= INT_MAX);
|
assert(s.size <= INT_MAX);
|
||||||
AppendToRedobuffLit((char_u *)s.data, (int)s.size);
|
AppendToRedobuffLit((char_u *)s.data, (int)s.size);
|
||||||
// readfile()-style: "\n" is indicated by presence of N+1 item.
|
// readfile()-style: "\n" is indicated by presence of N+1 item.
|
||||||
if (i + 1 < lines.size) {
|
if (i + 1 < lines.size) {
|
||||||
|
Reference in New Issue
Block a user