Bram Moolenaar wrote:

> Patch 8.2.0133
> Problem:    Invalid memory access with search command.
> Solution:   When :normal runs out of characters in bracketed paste mode break
>             out of the loop.(closes #5511)

The test passes, but vim-8.2.133 still crashes when doing:

$ ./vim --clean -e -s -c 'exe "norm /\x80PS"'
Segmentation fault (core dumped)

Running with valgrind gives:

==8332== Memcheck, a memory error detector
==8332== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==8332== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==8332== Command: ./vim --clean -e -s -c exe\ "norm\ /\\x80PS"
==8332==
==8332== Invalid read of size 1
==8332==    at 0x4C32CF2: strlen (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8332==    by 0x1747A4: bracketed_paste (edit.c:4945)
==8332==    by 0x1B8E05: getcmdline_int (ex_getln.c:2266)
==8332==    by 0x21EE61: nv_search (normal.c:4250)
==8332==    by 0x2248BE: normal_cmd (normal.c:1071)
==8332==    by 0x1AAD2C: exec_normal (ex_docmd.c:7697)
==8332==    by 0x1AAF8F: ex_normal (ex_docmd.c:7591)
==8332==    by 0x1AF0EF: do_one_cmd (ex_docmd.c:2482)
==8332==    by 0x1AF0EF: do_cmdline (ex_docmd.c:975)
==8332==    by 0x17EE35: ex_execute (eval.c:6129)
==8332==    by 0x1AF0EF: do_one_cmd (ex_docmd.c:2482)
==8332==    by 0x1AF0EF: do_cmdline (ex_docmd.c:975)
==8332==    by 0x336FA7: exe_commands (main.c:3135)
==8332==    by 0x336FA7: vim_main2 (main.c:795)
==8332==    by 0x13AB2C: main (main.c:444)
==8332==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

Regards
Dominique

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAON-T_gDE-VBfedcBu6jrY2AirefXPbGKuTosGJ1RB-SFtTKFQ%40mail.gmail.com.

Raspunde prin e-mail lui