fix: close cleanup and replay races, integer thumbnail sizing, sharp deadline, contract tests

This commit is contained in:
2026-11-16 16:56:50 +03:00
parent 3e0033fc79
commit 484119a6a9
9 changed files with 437 additions and 28 deletions
+3
View File
@@ -129,7 +129,10 @@ export function corruptedJpegs(valid: Buffer): Record<string, Buffer> {
for (let i = 800; i < garbled.length - 2; i += 3) {
garbled[i] = 0x55;
}
const foreignComponent = Buffer.from(valid);
foreignComponent[foreignComponent.indexOf(Buffer.from([0xff, 0xda])) + 5] = 250;
return {
'компонент SOS отсутствует в SOF': foreignComponent,
'27 байт без таблиц и данных': JPEG_WITHOUT_DATA,
'половина файла': valid.subarray(0, valid.length >> 1),
'без последних 20 байт': valid.subarray(0, valid.length - 20),