From f419dfcc79a650b4fc115ed7a6ecc8c8233b5ac8 Mon Sep 17 00:00:00 2001 From: konakona418 Date: Wed, 25 Mar 2026 16:10:25 +0800 Subject: [PATCH] [rtext] Add security check for LoadCodepoints() --- src/rtext.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rtext.c b/src/rtext.c index 936ab9c16886..5adabd3fe075 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -2175,7 +2175,10 @@ int *LoadCodepoints(const char *text, int *count) codepoints = temp; } - *count = codepointCount; + if (count != NULL) + { + *count = codepointCount; + } return codepoints; }