fix(archive): validate stream file archive paths and throw on premature bzip2 stream termination

This commit is contained in:
2026-04-30 13:13:49 +00:00
parent c75c358dfd
commit 1553dc67ef
10 changed files with 4254 additions and 4627 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ export function unbzip2Stream(): plugins.smartstream.SmartDuplex<Uint8Array, Uin
}
if (!broken && streamCRC !== null) {
this.emit('error', new Bzip2Error('Input stream ended prematurely', BZIP2_ERROR_CODES.PREMATURE_END));
throw new Bzip2Error('Input stream ended prematurely', BZIP2_ERROR_CODES.PREMATURE_END);
}
return null;
},