X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/ba6d6ed23dec08b1cd5700a128c0752491c10ac9..51004dcb01e06fef634b61be77ed73dd61cb6db9:/icuSources/tools/toolutil/ppucd.cpp diff --git a/icuSources/tools/toolutil/ppucd.cpp b/icuSources/tools/toolutil/ppucd.cpp index c2a1b77d..f1c711c8 100644 --- a/icuSources/tools/toolutil/ppucd.cpp +++ b/icuSources/tools/toolutil/ppucd.cpp @@ -71,7 +71,7 @@ PreparsedUCD::PreparsedUCD(const char *filename, UErrorCode &errorCode) } if(file==NULL) { perror("error opening preparsed UCD"); - fprintf(stderr, "error opening preparsed UCD file %s\n", filename); + fprintf(stderr, "error opening preparsed UCD file %s\n", filename ? filename : "\"no file name given\""); errorCode=U_FILE_ACCESS_ERROR; return; } @@ -327,6 +327,11 @@ PreparsedUCD::parseProperty(UniProps &props, const char *field, UnicodeSet &newV "for non-binary property on line %ld\n", field, (long)lineNumber); errorCode=U_PARSE_ERROR; + } else if (prop < UCHAR_INT_START) { + fprintf(stderr, + "error in preparsed UCD: prop value is invalid: '%d' for line %ld\n", + prop, (long)lineNumber); + errorCode=U_PARSE_ERROR; } else if(propgetPropertyValueEnum(prop, v); if(value==UCHAR_INVALID_CODE && prop==UCHAR_CANONICAL_COMBINING_CLASS) {