In YAMLParse::getNumberValueDeferred() / YAMLParse::_parseNumericValue() / YAMLParse::_parseIntValuev() methods, the lenght() method of the String object _cleanedTextValue is called. This could cause an unexpected NullPointerException when the previous steps make _cleanedTextValue become null with an invalid input value. To fix it, it is suggested to add a conditional check and report an error when _cleanedTextValue is null.
if (_cleanedTextValue.length() <= 18) {
return getNumberValue();
}
We found this issue by OSS-Fuzz and it is reported in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64662.