Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit640a67d

Browse files
committed
fix potential Denial of Service via specially crafted payloads
1 parent9d41448 commit640a67d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎lib/types/utils.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ export function findBox(input: Uint8Array, boxName: string, offset: number) {
7979
constbox=readBox(input,offset)
8080
if(!box)break
8181
if(box.name===boxName)returnbox
82-
offset+=box.size
82+
// Fix the infinite loop by ensuring offset always increases
83+
// If box.size is 0, advance by at least 8 bytes (the size of the box header)
84+
offset+=box.size>0 ?box.size :8
8385
}
8486
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp