From aee6f08ce12a62e9104892702a658a8d3daee4df Mon Sep 17 00:00:00 2001 From: bfredl Date: Mon, 17 Apr 2023 13:08:53 +0200 Subject: fix(runtime): do not allow breakcheck inside runtime path calculation problem: breakcheck might run arbitrary lua code, which might require modules and thus invoke runtime path calculation recursively. solution: Block the use of breakcheck when expanding glob patterns inside 'runtimepath' fixes #23012 --- src/nvim/path.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/path.h') diff --git a/src/nvim/path.h b/src/nvim/path.h index c8d192dffe..eaadc7f37d 100644 --- a/src/nvim/path.h +++ b/src/nvim/path.h @@ -26,6 +26,7 @@ #define EW_DODOT 0x4000 // also files starting with a dot #define EW_EMPTYOK 0x8000 // no matches is not an error #define EW_NOTENV 0x10000 // do not expand environment variables +#define EW_NOBREAK 0x20000 // do not invoke breakcheck /// Return value for the comparison of two files. Also @see path_full_compare. typedef enum file_comparison { -- cgit From 4f8941c1a5f1ef6caa410feeb52e343db22763ce Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 10 Nov 2023 12:23:42 +0100 Subject: refactor: replace manual header guards with #pragma once It is less error-prone than manually defining header guards. Pretty much all compilers support it even if it's not part of the C standard. --- src/nvim/path.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/path.h') diff --git a/src/nvim/path.h b/src/nvim/path.h index eaadc7f37d..48cbeaf684 100644 --- a/src/nvim/path.h +++ b/src/nvim/path.h @@ -1,5 +1,4 @@ -#ifndef NVIM_PATH_H -#define NVIM_PATH_H +#pragma once #include "nvim/func_attr.h" #include "nvim/garray.h" @@ -40,4 +39,3 @@ typedef enum file_comparison { #ifdef INCLUDE_GENERATED_DECLARATIONS # include "path.h.generated.h" #endif -#endif // NVIM_PATH_H -- cgit From 6361806aa28edca55ad3316a58bc3e936df9c0eb Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 26 Nov 2023 22:58:52 +0800 Subject: refactor: move garray_T to garray_defs.h (#26227) --- src/nvim/path.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/path.h') diff --git a/src/nvim/path.h b/src/nvim/path.h index 48cbeaf684..66dbb53fb6 100644 --- a/src/nvim/path.h +++ b/src/nvim/path.h @@ -1,7 +1,7 @@ #pragma once #include "nvim/func_attr.h" -#include "nvim/garray.h" +#include "nvim/garray_defs.h" #include "nvim/types.h" // Flags for expand_wildcards() -- cgit From 574d25642fc9ca65b396633aeab6e2d32778b642 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 17:21:58 +0800 Subject: refactor: move Arena and ArenaMem to memory_defs.h (#26240) --- src/nvim/path.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/nvim/path.h') diff --git a/src/nvim/path.h b/src/nvim/path.h index 66dbb53fb6..0116e2ac97 100644 --- a/src/nvim/path.h +++ b/src/nvim/path.h @@ -1,7 +1,9 @@ #pragma once +#include // IWYU pragma: keep + #include "nvim/func_attr.h" -#include "nvim/garray_defs.h" +#include "nvim/garray_defs.h" // IWYU pragma: keep #include "nvim/types.h" // Flags for expand_wildcards() -- cgit From 6c14ae6bfaf51415b555e9a6b85d1d280976358d Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 20:27:32 +0100 Subject: refactor: rename types.h to types_defs.h --- src/nvim/path.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/path.h') diff --git a/src/nvim/path.h b/src/nvim/path.h index 0116e2ac97..19b6081b42 100644 --- a/src/nvim/path.h +++ b/src/nvim/path.h @@ -4,7 +4,7 @@ #include "nvim/func_attr.h" #include "nvim/garray_defs.h" // IWYU pragma: keep -#include "nvim/types.h" +#include "nvim/types_defs.h" // Flags for expand_wildcards() #define EW_DIR 0x01 // include directory names -- cgit From 718053b7a97c4e2fbaa6077d3c9f4dc7012c8aad Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 28 Nov 2023 07:47:36 +0800 Subject: refactor: fix runtime_defs.h (#26259) --- src/nvim/path.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/path.h') diff --git a/src/nvim/path.h b/src/nvim/path.h index 19b6081b42..89f939dd02 100644 --- a/src/nvim/path.h +++ b/src/nvim/path.h @@ -4,7 +4,7 @@ #include "nvim/func_attr.h" #include "nvim/garray_defs.h" // IWYU pragma: keep -#include "nvim/types_defs.h" +#include "nvim/types_defs.h" // IWYU pragma: keep // Flags for expand_wildcards() #define EW_DIR 0x01 // include directory names -- cgit