Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d59d02e1 authored by nkk71's avatar nkk71 Committed by Dees Troy
Browse files

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
parent cd00a8b3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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");