comparison src/eval.c @ 20158:94f05de75e9f v8.2.0634

patch 8.2.0634: crash with null partial and blob Commit: https://github.com/vim/vim/commit/92b83ccfda7a1d654ccaaf161a9c8a8e01fbcf76 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 25 15:24:44 2020 +0200 patch 8.2.0634: crash with null partial and blob Problem: Crash with null partial and blob. Solution: Check for NULL pointer. Add more tests. (Yegappan Lakshmanan, closes #5984)
author Bram Moolenaar <Bram@vim.org>
date Sat, 25 Apr 2020 15:30:04 +0200
parents 49694eceaa55
children 06a1dd50463e
comparison
equal deleted inserted replaced
20157:ada5332a22b7 20158:94f05de75e9f
3680 char_u * 3680 char_u *
3681 partial_name(partial_T *pt) 3681 partial_name(partial_T *pt)
3682 { 3682 {
3683 if (pt->pt_name != NULL) 3683 if (pt->pt_name != NULL)
3684 return pt->pt_name; 3684 return pt->pt_name;
3685 return pt->pt_func->uf_name; 3685 if (pt->pt_func != NULL)
3686 return pt->pt_func->uf_name;
3687 return (char_u *)"";
3686 } 3688 }
3687 3689
3688 static void 3690 static void
3689 partial_free(partial_T *pt) 3691 partial_free(partial_T *pt)
3690 { 3692 {