]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.0.2033: gcc overflow-warning for f_resolve v9.0.2033
authorKen Takata <kentkt@csc.jp>
Mon, 16 Oct 2023 07:57:43 +0000 (09:57 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 16 Oct 2023 07:57:43 +0000 (09:57 +0200)
commit215c3261a25f7a99e8711a3b3c6158119c6aea9e
tree6ba5f52dbbab4b9e6cdee451a143cd637ae1e02c
parentdbf749bd5aaef6ea2d28bce081349785d174d96a
patch 9.0.2033: gcc overflow-warning for f_resolve

Problem:  gcc overflow-warning for f_resolve
Solution: use pointer p instead of pointer q[-1]

Suppress the following warning:
```
filepath.c: In function ‘f_resolve’:
filepath.c:2162:27: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 2162 |                     q[-1] = NUL;
```

Closes: #13352
closes: #13353

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
src/filepath.c
src/version.c