From 16ec37a2263dcf6a89567019b618dafb87b69feb Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 24 Feb 2019 17:20:11 -0500 Subject: [PATCH] Fix compression without outname --- native/jni/magiskboot/compress.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/jni/magiskboot/compress.cpp b/native/jni/magiskboot/compress.cpp index 7195d5ceb..f437b1c0d 100644 --- a/native/jni/magiskboot/compress.cpp +++ b/native/jni/magiskboot/compress.cpp @@ -104,7 +104,7 @@ void compress(const char *method, const char *infile, const char *outfile) { * STDIN, output to .[ext] */ char *tmp = new char[strlen(infile) + 5]; sprintf(tmp, "%s%s", infile, fmt2ext[it->second]); - out_fd = xopen(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0644); + out_fd = xopen(tmp, O_WRONLY | O_CREAT | O_TRUNC, 0644); fprintf(stderr, "Compressing to [%s]\n", tmp); delete[] tmp; rm_in = true;