Files
Firelink/scripts/appimage-offset.js
T
NimBold 1c5895156a fix(release): inspect AppImage SquashFS at runtime offset
- Read SquashFS permissions after locating the embedded filesystem.
- Reject malformed and unsafe AppImage offsets.
- Cover offset parsing with regression tests.
2026-10-10 00:11:51 +03:30

8 lines
290 B
JavaScript

export function parseAppImageOffset(output) {
const offset = typeof output === 'string' ? output.trim() : '';
if (!/^[1-9]\d*$/.test(offset) || !Number.isSafeInteger(Number(offset))) {
throw new Error('AppImage runtime returned an invalid SquashFS offset.');
}
return offset;
}