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

Commit 83a6d36d authored by Hong-Mei Li's avatar Hong-Mei Li
Browse files

libsparse: Fix null pointer issue



Fix the issue that "out" pointer is dereferenced without checking.

Change-Id: I76a57ad7309841218231346f4807ef2be8628737
Signed-off-by: default avatarHong-Mei Li <a21834@motorola.com>
parent f5562cb6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -675,6 +675,9 @@ struct output_file *output_file_open_fd(int fd, unsigned int block_size, int64_t
	} else {
		out = output_file_new_normal();
	}
	if (!out) {
		return NULL;
	}

	out->ops->open(out, fd);