[njs] Using invalid UTF-8 string as atom number 0.
noreply at nginx.com
noreply at nginx.com
Thu May 1 02:12:02 UTC 2025
details: https://github.com/nginx/njs/commit/4562abcb2fe5c2d916371c1885b62e96aeb99807
branches: master
commit: 4562abcb2fe5c2d916371c1885b62e96aeb99807
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Wed, 30 Apr 2025 18:32:39 -0700
description:
Using invalid UTF-8 string as atom number 0.
This prevents a clash with possible valid UTF-8 strings.
---
src/njs_atom_defs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/njs_atom_defs.h b/src/njs_atom_defs.h
index f940648a..6328c34b 100644
--- a/src/njs_atom_defs.h
+++ b/src/njs_atom_defs.h
@@ -5,7 +5,7 @@
*/
-NJS_DEF_STRING(unknown, "unknown", 0, NJS_TOKEN_ILLEGAL)
+NJS_DEF_STRING(unknown, "\xFF\xFF", 0, NJS_TOKEN_ILLEGAL)
NJS_DEF_SYMBOL(asyncIterator, "Symbol.asyncIterator")
NJS_DEF_SYMBOL(hasInstance, "Symbol.hasInstance")
More information about the nginx-devel
mailing list