Skip to content

Commit

Permalink
feat: NSIS uninstaller uncompressed support (#4305) (#4415)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder authored and develar committed Nov 27, 2019
1 parent d55f880 commit eb32b22
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/app-builder-lib/src/targets/nsis/nsisUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ export class UninstallerReader {
let innerBuffer = null
while (true) {
let size = nsisReader.uint32()
if ((size & 0x80000000) === 0) {
const compressed = (size & 0x80000000) !== 0
size = size & 0x7FFFFFFF
if (size === 0 || (nsisReader.position + size) > nsisReader.length || nsisReader.position >= nsisReader.length) {
break
}
size &= 0x7FFFFFFF
if (size === 0 || nsisReader.position >= nsisReader.length) {
break
let buffer = nsisReader.bytes(size)
if (compressed) {
buffer = zlib.inflateRawSync(buffer)
}
const compressedData = nsisReader.bytes(size)
const buffer = zlib.inflateRawSync(compressedData)
const innerReader = new BinaryReader(buffer)
innerReader.uint32() // ?
if (innerReader.match(nsisSignature)) {
Expand Down

0 comments on commit eb32b22

Please sign in to comment.