exifreader 4.40.4 → 4.40.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/exif-reader.js +1 -1
- package/dist/exif-reader.js.map +1 -1
- package/package.json +1 -1
- package/src/icc-tags.js +4 -0
package/package.json
CHANGED
package/src/icc-tags.js
CHANGED
|
@@ -89,6 +89,7 @@ function doesNotHaveTagData(dataView, tagHeaderOffset) {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
export function parseTags(dataView) {
|
|
92
|
+
const MAX_MLUC_RECORDS = 1000;
|
|
92
93
|
const buffer = dataView.buffer;
|
|
93
94
|
|
|
94
95
|
const length = dataView.getUint32();
|
|
@@ -164,6 +165,9 @@ export function parseTags(dataView) {
|
|
|
164
165
|
if (recordSize < MIN_MULTI_LOCALIZED_UNICODE_RECORD_SIZE) {
|
|
165
166
|
return tags;
|
|
166
167
|
}
|
|
168
|
+
if (numRecords > MAX_MLUC_RECORDS) {
|
|
169
|
+
return tags;
|
|
170
|
+
}
|
|
167
171
|
const recordsSize = numRecords * recordSize;
|
|
168
172
|
const availableRecordsSize = dataView.byteLength - tagOffset
|
|
169
173
|
- MULTI_LOCALIZED_UNICODE_RECORDS_OFFSET;
|