A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neovim/neovim/commit/8170260bb35f3761d2008405289832b2620abc53 below:

str_to_reg passing NULL to memcpy · neovim/neovim@8170260 · GitHub

Skip to content Navigation Menu

Saved searches Use saved searches to filter your results more quickly

Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert Additional navigation options

Commit 8170260

fix(ops): str_to_reg passing NULL to memcpy

Required for the tests introduced in v8.2.3601 to pass ASAN when running test_alot.vim. Co-authored-by: erw7 <erw7.github@gmail.com>
1 parent 308c195 commit 8170260

Copy full SHA for 8170260

File tree Expand file treeCollapse file tree 1 file changed

+3

-1

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+3

-1

lines changed +3-1Lines changed: 3 additions & 1 deletion Original file line number Diff line number Diff line change

@@ -5696,7 +5696,9 @@ static void str_to_reg(yankreg_T *y_ptr, MotionType yank_type, const char_u *str

5696 5696

// When appending, copy the previous line and free it after.

5697 5697

size_t extra = append ? STRLEN(pp[--lnum]) : 0;

5698 5698

char_u *s = xmallocz(line_len + extra);

5699 -

memcpy(s, pp[lnum], extra);

5699 +

if (extra > 0) {

5700 +

memcpy(s, pp[lnum], extra);

5701 +

}

5700 5702

memcpy(s + extra, start, line_len);

5701 5703

size_t s_len = extra + line_len;

5702 5704

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4