You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
6. While iter is less than length and iter is less than 38, continuously loop through these steps:
1. If the two bytes from sequence[iter] to sequence[iter + 1] are equal to 0x42 0x82,
1. Increment iter by 2.
2. If iter is greater or equal than length, abort these steps.
3. Let number size be the result of [parsing a vint](https://mimesniff.spec.whatwg.org/#parse-a-vint) starting at sequence[iter].
4. Increment iter by number size.
5. If iter is less than length - 4, abort these steps.
6. Let matched be the result of [matching a padded sequence](https://mimesniff.spec.whatwg.org/#matching-a-padded-sequence) 0x77 0x65 0x62 0x6D ("webm") on sequence at offset iter.
7. If matched is true, abort these steps and return true.
2. Increment iter by 1.
7. Return false.
at step 6.1.5 If iter is less than length - 4, abort these steps. this condition will normally always be true: we have not iterated to the end of the file yet, so iter will always be less than length - 4
it should read: If iter is greater than length - 4, abort these steps.
The text was updated successfully, but these errors were encountered:
jyavenard
added a commit
to jyavenard/mimesniff
that referenced
this issue
Mar 19, 2024
What is the issue with the MIME Sniffing Standard?
In its current state, the Signature for WebM algorithm will always return false.
https://mimesniff.spec.whatwg.org/#signature-for-webm
current step 6 reads:
at step 6.1.5
If iter is less than length - 4, abort these steps.
this condition will normally always be true: we have not iterated to the end of the file yet, so iter will always be less thanlength - 4
it should read:
If iter is greater than length - 4, abort these steps.
The text was updated successfully, but these errors were encountered: