vim-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 vim/vim#5984)

92b83ccfda

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-04-15 13:31:30 +08:00
parent 4b49f312a0
commit 85741677c8
12 changed files with 86 additions and 3 deletions

View File

@@ -4059,7 +4059,10 @@ char *partial_name(partial_T *pt)
if (pt->pt_name != NULL) {
return pt->pt_name;
}
return pt->pt_func->uf_name;
if (pt->pt_func != NULL) {
return pt->pt_func->uf_name;
}
return "";
}
static void partial_free(partial_T *pt)