diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-08-07 22:40:32 +0200 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2026-08-08 02:23:55 +0200 |
| commit | eecc4b73ffe614a5fa79992d4890c234c0fe2f0f (patch) | |
| tree | 6828b2d7988eebf03dc04e9d29957c9c6d2a8e29 /runtime/plugin/python_setup.vim | |
| parent | f0a01822850bf7324326a3424f6b9a6892e5a768 (diff) | |
| download | rneovim-eecc4b73ffe614a5fa79992d4890c234c0fe2f0f.tar.gz rneovim-eecc4b73ffe614a5fa79992d4890c234c0fe2f0f.tar.bz2 rneovim-eecc4b73ffe614a5fa79992d4890c234c0fe2f0f.zip | |
fix(coverity): UNINIT, FORWARD_NULL
CID 652778: Uninitialized variables (UNINIT)
/src/nvim/context.c: 353 in ctx_dirs_save()
347 if (curbuf->b_sfname != NULL && curbuf->b_fname == curbuf->b_sfname) {
348 cs->cs_save_sfname = xstrdup(curbuf->b_sfname);
349 }
350 do_autochdir();
351 char autocwd[MAXPATHL];
352 if (os_dirname(autocwd, MAXPATHL) == OK) {
>>> CID 652778: Uninitialized variables (UNINIT)
>>> Using uninitialized value "*cwd" when calling "strcmp".
353 cs->cs_apply_acd = strcmp(cwd, autocwd) == 0;
354 }
355 }
356 }
357
358 /// Restores the dir state saved by ctx_dirs_save(), undoing any chdir made while switched. The
CID 652777: Null pointer dereferences (FORWARD_NULL)
/src/nvim/context.c: 556 in ctx_switch()
550 cs->cs_target_win = wp->handle;
551 cs->cs_target_old_pos = wp->w_cursor;
552 }
553 // The CWD-state snapshot is only for a real window target; hidden-buffer target is handled by the
554 // ctx_win machinery (ctx_win_prep).
555 if (buf == NULL || wp != NULL) {
>>> CID 652777: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "wp" to "ctx_dirs_save", which dereferences it.
556 ctx_dirs_save(cs, wp, tp == NULL ? curtab : tp, buf);
557 }
558
559 // Save the current state.
560 cs->cs_curwin = curwin->handle;
561 cs->cs_prevwin = prevwin == NULL ? 0 : prevwin->handle;
Diffstat (limited to 'runtime/plugin/python_setup.vim')
0 files changed, 0 insertions, 0 deletions