From 0a9a1dc7cade816842ed98ac026e59f82d4a2052 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Thu, 16 Feb 2023 15:46:49 +0300 Subject: [PATCH] Fix faulty frms Closes #235 --- src/art.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/art.cc b/src/art.cc index 426a33f..bb1a0f3 100644 --- a/src/art.cc +++ b/src/art.cc @@ -1076,6 +1076,11 @@ static int artReadHeader(Art* art, File* stream) if (fileReadInt32List(stream, art->dataOffsets, ROTATION_COUNT) == -1) return -1; if (fileReadInt32(stream, &(art->dataSize)) == -1) return -1; + // CE: Fix malformed `frm` files with `dataSize` set to 0 in Nevada. + if (art->dataSize == 0) { + art->dataSize = fileGetSize(stream); + } + return 0; }