commit | 83a6d36d4226f82c202ffb27f89e080f95b71c30 | [log] [tgz] |
---|---|---|
author | Hong-Mei Li <a21834@motorola.com> | Mon Apr 01 11:22:50 2013 +0800 |
committer | Hong-Mei Li <a21834@motorola.com> | Mon Apr 01 11:22:50 2013 +0800 |
tree | 39d81591491497545bb2c9fa2f3dc65dd5faa987 | |
parent | f5562cb66c1c15d65bc372ede4c180430e1ce9d7 [diff] [blame] |
libsparse: Fix null pointer issue Fix the issue that "out" pointer is dereferenced without checking. Change-Id: I76a57ad7309841218231346f4807ef2be8628737 Signed-off-by: Hong-Mei Li <a21834@motorola.com>
diff --git a/libsparse/output_file.c b/libsparse/output_file.c index b5ae419..5014e4a 100644 --- a/libsparse/output_file.c +++ b/libsparse/output_file.c
@@ -675,6 +675,9 @@ } else { out = output_file_new_normal(); } + if (!out) { + return NULL; + } out->ops->open(out, fd);