Skip to content

Commit 85eb7ee

Browse files
committed
fix erroneous footer length check in reader
1 parent 4333e54 commit 85eb7ee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

js/src/ipc/reader/binary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function readFileSchema(bb: ByteBuffer) {
162162
(!checkForMagicArrowString(bb.bytes(), fileLength - magicLength) /* Missing magic end */) ||
163163
(/* Invalid footer length */
164164
(footerLength = bb.readInt32(footerOffset = fileLength - magicAndPadding)) < 1 &&
165-
(footerLength + magicX2AndPadding > fileLength))) {
165+
(footerLength + footerOffset > fileLength))) {
166166
return null;
167167
}
168168
bb.setPosition(footerOffset - footerLength);

0 commit comments

Comments
 (0)