comparison src/eval.c @ 26642:7fe649a64777 v8.2.3850

patch 8.2.3850: illegal memory access when displaying a partial Commit: https://github.com/vim/vim/commit/2de5371a755abd287dab6ff544924715a76d4abe Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 19 11:06:35 2021 +0000 patch 8.2.3850: illegal memory access when displaying a partial Problem: Illegal memory access when displaying a partial. Solution: Terminate the string with a NUL. (closes https://github.com/vim/vim/issues/9371)
author Bram Moolenaar <Bram@vim.org>
date Sun, 19 Dec 2021 12:15:03 +0100
parents 6047c7ea7963
children 6f8d3470fa90
comparison
equal deleted inserted replaced
26641:0772d9367e2d 26642:7fe649a64777
5085 dtv.v_type = VAR_DICT; 5085 dtv.v_type = VAR_DICT;
5086 dtv.vval.v_dict = pt->pt_dict; 5086 dtv.vval.v_dict = pt->pt_dict;
5087 ga_concat(&ga, tv2string(&dtv, &tf, numbuf, copyID)); 5087 ga_concat(&ga, tv2string(&dtv, &tf, numbuf, copyID));
5088 vim_free(tf); 5088 vim_free(tf);
5089 } 5089 }
5090 ga_concat(&ga, (char_u *)")"); 5090 // terminate with ')' and a NUL
5091 ga_concat_len(&ga, (char_u *)")", 2);
5091 5092
5092 *tofree = ga.ga_data; 5093 *tofree = ga.ga_data;
5093 r = *tofree; 5094 r = *tofree;
5094 break; 5095 break;
5095 } 5096 }