diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-20 22:58:37 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-20 22:58:37 +0200 |
commit | 6f10c70b59fa4e56aa479345fb0caeaac7429bfb (patch) | |
tree | cdbb54c3b73a4607d8bdebb116c962bb044246f5 /src/ops.c | |
parent | 1058c9d9b5815467182d487f10f6dd71385cb796 (diff) | |
download | vim-git-6f10c70b59fa4e56aa479345fb0caeaac7429bfb.tar.gz |
patch 8.1.1895: using NULL pointer when out of memoryv8.1.1895
Problem: Using NULL pointer when out of memory.
Solution: Bail out or skip the code using the pointer. (Zu-Ming Jiang,
closes #4805, closes #4843, closes #4939, closes #4844)
Diffstat (limited to 'src/ops.c')
-rw-r--r-- | src/ops.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4556,6 +4556,11 @@ do_join( /* allocate the space for the new line */ newp = alloc(sumsize + 1); + if (newp == NULL) + { + ret = FAIL; + goto theend; + } cend = newp + sumsize; *cend = 0; |