Welcome! Log In Create A New Profile

Advanced

[njs] Checking cwd path length in njs_module_relative_path().

Dmitry Volyntsev
December 15, 2021 08:16AM
details: https://hg.nginx.org/njs/rev/ee500f43e2a2
branches:
changeset: 1766:ee500f43e2a2
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Tue Dec 14 20:06:23 2021 +0000
description:
Checking cwd path length in njs_module_relative_path().

diffstat:

src/njs_module.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 02da0ed4a778 -r ee500f43e2a2 src/njs_module.c
--- a/src/njs_module.c Tue Dec 14 14:08:12 2021 +0000
+++ b/src/njs_module.c Tue Dec 14 20:06:23 2021 +0000
@@ -361,6 +361,10 @@ njs_module_relative_path(njs_vm_t *vm, c

file.length = dir->length;

+ if (file.length == 0) {
+ return NJS_DECLINED;
+ }
+
trail = (dir->start[dir->length - 1] != '/');

if (trail) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Checking cwd path length in njs_module_relative_path().

Dmitry Volyntsev 292 December 15, 2021 08:16AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 234
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready