Mercurial > vim
comparison src/ex_getln.c @ 14520:20866abc790b v8.1.0273
patch 8.1.0273: invalid memory access when using 'incsearch'
commit https://github.com/vim/vim/commit/ef73a28401cde680dc0d02d4b0fb19ed659ec1d3
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 11 19:02:22 2018 +0200
patch 8.1.0273: invalid memory access when using 'incsearch'
Problem: Invalid memory access when using 'incsearch'.
Solution: Reset "patlen" when using previous search pattern.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 11 Aug 2018 19:15:04 +0200 |
parents | 3648e74dd523 |
children | 97641c4f5687 |
comparison
equal
deleted
inserted
replaced
14519:5c5908e81e93 | 14520:20866abc790b |
---|---|
502 return OK; | 502 return OK; |
503 if (patlen == 0 && ccline.cmdbuff[skiplen] == NUL) | 503 if (patlen == 0 && ccline.cmdbuff[skiplen] == NUL) |
504 return FAIL; | 504 return FAIL; |
505 | 505 |
506 if (firstc == ccline.cmdbuff[skiplen]) | 506 if (firstc == ccline.cmdbuff[skiplen]) |
507 { | |
507 pat = last_search_pattern(); | 508 pat = last_search_pattern(); |
509 skiplen = 0; | |
510 patlen = STRLEN(pat); | |
511 } | |
508 else | 512 else |
509 pat = ccline.cmdbuff + skiplen; | 513 pat = ccline.cmdbuff + skiplen; |
510 | 514 |
511 save_last_search_pattern(); | 515 save_last_search_pattern(); |
512 cursor_off(); | 516 cursor_off(); |