From d59d02e1a1f7ab8b90c0ee97f29df5c7c01727ca Mon Sep 17 00:00:00 2001 From: nkk71 Date: Thu, 29 Jun 2017 15:16:23 +0300 Subject: twrpTar: Fix uninitialized current_archive_type * current_archive_type is not properly initialized leading to a potential random close(fd) in closeTar() Change-Id: I1598ba4d524b723b8175ee847e2b1c5aeedbd938 --- twrpTar.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/twrpTar.cpp b/twrpTar.cpp index d86e13382..aa00044d4 100644 --- a/twrpTar.cpp +++ b/twrpTar.cpp @@ -1102,6 +1102,7 @@ int twrpTar::createTar() { } } else { // Not compressed or encrypted + current_archive_type = UNCOMPRESSED; init_libtar_buffer(0, progress_pipe_fd); if (part_settings->adbbackup) { LOGINFO("Opening TW_ADB_BACKUP uncompressed stream\n"); -- cgit v1.2.3