Welcome! Log In Create A New Profile

Advanced

[njs] Improved njs_string_create_chb().

Dmitry Volyntsev
March 08, 2023 12:10AM
details: https://hg.nginx.org/njs/rev/e3a609ff9001
branches:
changeset: 2065:e3a609ff9001
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Fri Mar 03 18:50:23 2023 -0800
description:
Improved njs_string_create_chb().

Adding a more informative description when the function cannot build a
valid UTF-8 string out of chained buffers.

diffstat:

src/njs_string.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 9367f3dfe0d9 -r e3a609ff9001 src/njs_string.c
--- a/src/njs_string.c Fri Mar 03 22:57:30 2023 +0300
+++ b/src/njs_string.c Fri Mar 03 18:50:23 2023 -0800
@@ -160,7 +160,7 @@ njs_string_create_chb(njs_vm_t *vm, njs_

length = njs_chb_utf8_length(chain);
if (njs_slow_path(length < 0)) {
- njs_memory_error(vm);
+ njs_internal_error(vm, "invalid UTF-8 string");
return NJS_ERROR;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Improved njs_string_create_chb().

Dmitry Volyntsev 406 March 08, 2023 12:10AM



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

Online Users

Guests: 129
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready