Mercurial > vim
comparison src/userfunc.c @ 25267:c69ebc71bd85 v8.2.3170
patch 8.2.3170: Illegal memory access in test
Commit: https://github.com/vim/vim/commit/d8cee76b498507c48706f651aeb78b93b5376d00
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 15 23:15:59 2021 +0200
patch 8.2.3170: Illegal memory access in test
Problem: Illegal memory access in test.
Solution: Check pointer is not before the start of the line.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 15 Jul 2021 23:30:04 +0200 |
parents | 1d6ff96306fc |
children | d42ac4880e0f |
comparison
equal
deleted
inserted
replaced
25266:535c3b8a9d34 | 25267:c69ebc71bd85 |
---|---|
868 | 868 |
869 // Check for nested inline function. | 869 // Check for nested inline function. |
870 end = p + STRLEN(p) - 1; | 870 end = p + STRLEN(p) - 1; |
871 while (end > p && VIM_ISWHITE(*end)) | 871 while (end > p && VIM_ISWHITE(*end)) |
872 --end; | 872 --end; |
873 if (*end == '{') | 873 if (end > p && *end == '{') |
874 { | 874 { |
875 --end; | 875 --end; |
876 while (end > p && VIM_ISWHITE(*end)) | 876 while (end > p && VIM_ISWHITE(*end)) |
877 --end; | 877 --end; |
878 if (end > p - 2 && end[-1] == '=' && end[0] == '>') | 878 if (end > p - 2 && end[-1] == '=' && end[0] == '>') |