summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHong-Mei Li2013-03-31 22:22:50 -0500
committerHong-Mei Li2013-03-31 22:22:50 -0500
commit83a6d36d4226f82c202ffb27f89e080f95b71c30 (patch)
tree39d81591491497545bb2c9fa2f3dc65dd5faa987 /libsparse
parentf5562cb66c1c15d65bc372ede4c180430e1ce9d7 (diff)
downloadplatform-system-core-83a6d36d4226f82c202ffb27f89e080f95b71c30.tar.gz
platform-system-core-83a6d36d4226f82c202ffb27f89e080f95b71c30.tar.xz
platform-system-core-83a6d36d4226f82c202ffb27f89e080f95b71c30.zip
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>
Diffstat (limited to 'libsparse')
-rw-r--r--libsparse/output_file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libsparse/output_file.c b/libsparse/output_file.c
index b5ae4191f..5014e4a87 100644
--- a/libsparse/output_file.c
+++ b/libsparse/output_file.c
@@ -675,6 +675,9 @@ struct output_file *output_file_open_fd(int fd, unsigned int block_size, int64_t
675 } else { 675 } else {
676 out = output_file_new_normal(); 676 out = output_file_new_normal();
677 } 677 }
678 if (!out) {
679 return NULL;
680 }
678 681
679 out->ops->open(out, fd); 682 out->ops->open(out, fd);
680 683