A few more minor fixes geared towards lgtm.com alerts (#6127)
* Remove unfilled formatting placeholders in KLT parser. * Fix presumably unintentionally missing reference on PlanatPtr and ChunkyPtr call operators. * Fix catching pointer and make use-after-free of workimg easier to spot. Make sure all of our thrown exceptions derive from std::exception and then catch by reference instead of by pointer. * Fix mismatch between array form new and non-array form delete. * Simplify memory management of embedded color profiles by unifying allocation to use operator new.
This commit is contained in:
@@ -559,19 +559,19 @@ static structureType _readHeader(
|
||||
if (id == FEATURE_TABLE) {
|
||||
fscanf(fp, "%s", line);
|
||||
if (strcmp(line, ",") != 0) {
|
||||
KLTError("(_readFeatures) File '%s' is corrupted -- "
|
||||
KLTError("(_readFeatures) File is corrupted -- "
|
||||
"(Expected 'comma', found '%s' instead)", line);
|
||||
exit(1);
|
||||
}
|
||||
fscanf(fp, "%s", line);
|
||||
if (strcmp(line, "nFeatures") != 0) {
|
||||
KLTError("(_readFeatures) File '%s' is corrupted -- "
|
||||
KLTError("(_readFeatures) File is corrupted -- "
|
||||
"(2 Expected 'nFeatures ', found '%s' instead)", line);
|
||||
exit(1);
|
||||
}
|
||||
fscanf(fp, "%s", line);
|
||||
if (strcmp(line, "=") != 0) {
|
||||
KLTError("(_readFeatures) File '%s' is corrupted -- "
|
||||
KLTError("(_readFeatures) File is corrupted -- "
|
||||
"(2 Expected '= ', found '%s' instead)", line);
|
||||
exit(1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user