From faa80a297236c5976a80429784ed91315adbc4c3 Mon Sep 17 00:00:00 2001 From: Rich Gillam Date: Tue, 4 Mar 2025 18:09:25 -0800 Subject: [PATCH] ICU-23062 Added null check in one spot in genrb where we know we've seen crashes. --- icu4c/source/tools/genrb/parse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icu4c/source/tools/genrb/parse.cpp b/icu4c/source/tools/genrb/parse.cpp index eb85d5157a6..3a53e999ff1 100644 --- a/icu4c/source/tools/genrb/parse.cpp +++ b/icu4c/source/tools/genrb/parse.cpp @@ -297,7 +297,7 @@ static char *getInvariantString(ParseState* state, uint32_t *line, struct UStrin if(!uprv_isInvariantUString(tokenValue->fChars, tokenValue->fLength)) { *status = U_INVALID_FORMAT_ERROR; - error(*line, "invariant characters required for table keys, binary data, etc."); + error((line == nullptr) ? 0 : *line, "invariant characters required for table keys, binary data, etc."); return nullptr; }