diff options
author | Campbell Barton <campbell@blender.org> | 2022-10-30 07:34:02 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-10-30 07:34:02 +0300 |
commit | d66f24cfe30d26e03863a78de9fd58bb3b65ed43 (patch) | |
tree | c626e7dd55f5c2ea3e72edb28224e5654f54bf55 /source/blender/editors/space_buttons | |
parent | 5d77c3a6a5a27094342d942c5eb4db3c8ded1cd1 (diff) |
Fix potential buffer overflow with BLI_path_slash_ensure use
BLI_path_slash_ensure was appending to fixed sized buffers without
a size check.
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index a9ce9a3d723..4013288b13b 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -205,7 +205,7 @@ static int file_browse_exec(bContext *C, wmOperator *op) if (BLI_is_dir(path)) { /* Do this first so '//' isn't converted to '//\' on windows. */ - BLI_path_slash_ensure(path); + BLI_path_slash_ensure(path, sizeof(path)); if (is_relative) { BLI_path_rel(path, BKE_main_blendfile_path(bmain)); str_len = strlen(path); |