comparison src/option.c @ 10887:40939b171432 v8.0.0333

patch 8.0.0333: illegal memory access when 'complete' ends in a backslash commit https://github.com/vim/vim/commit/226c53429109f24e31c17016aedfd7fbf7a9aa50 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 17 14:53:15 2017 +0100 patch 8.0.0333: illegal memory access when 'complete' ends in a backslash Problem: Illegal memory access when 'complete' ends in a backslash. Solution: Check for trailing backslash. (Dominique Pelle, closes https://github.com/vim/vim/issues/1478)
author Christian Brabandt <cb@256bit.org>
date Fri, 17 Feb 2017 15:00:05 +0100
parents e926c5a7f9bf
children 7fc1df5536c9
comparison
equal deleted inserted replaced
10886:5b3545b55610 10887:40939b171432
7015 if (s[-1] == 'k' || s[-1] == 's') 7015 if (s[-1] == 'k' || s[-1] == 's')
7016 { 7016 {
7017 /* skip optional filename after 'k' and 's' */ 7017 /* skip optional filename after 'k' and 's' */
7018 while (*s && *s != ',' && *s != ' ') 7018 while (*s && *s != ',' && *s != ' ')
7019 { 7019 {
7020 if (*s == '\\') 7020 if (*s == '\\' && s[1] != NUL)
7021 ++s; 7021 ++s;
7022 ++s; 7022 ++s;
7023 } 7023 }
7024 } 7024 }
7025 else 7025 else