forked from mtusi2026/mtusi2026lab5
fix: close cleanup and replay races, integer thumbnail sizing, sharp deadline, contract tests
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user