mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.4847: crash when using uninitialized function pointer
Problem: Crash when using uninitialized function pointer. Solution: Check for NULL pointer. (closes #10319, closes #10319)
This commit is contained in:
@@ -5314,7 +5314,8 @@ echo_string_core(
|
||||
|
||||
if (echo_style)
|
||||
{
|
||||
r = make_ufunc_name_readable(tv->vval.v_string,
|
||||
r = tv->vval.v_string == NULL ? (char_u *)"function()"
|
||||
: make_ufunc_name_readable(tv->vval.v_string,
|
||||
buf, MAX_FUNC_NAME_LEN);
|
||||
if (r == buf)
|
||||
{
|
||||
|
Reference in New Issue
Block a user