From 6c95b2041e8f0d107db2fab0391bff8ce637d01f Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 27 Jul 2019 18:22:49 +0200 Subject: Fix: return the correct value from data_reader_create Cut & paste misshap after mergining with fragment reader: If there are no fragments, data_reader_create should return the data reader, not 0! Signed-off-by: David Oberhollenzer --- lib/sqfs/data_reader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sqfs/data_reader.c b/lib/sqfs/data_reader.c index a7d605e..780a2a6 100644 --- a/lib/sqfs/data_reader.c +++ b/lib/sqfs/data_reader.c @@ -47,7 +47,7 @@ data_reader_t *data_reader_create(int fd, sqfs_super_t *super, if (super->fragment_entry_count == 0 || (super->flags & SQFS_FLAG_NO_FRAGMENTS) != 0) { - return 0; + return data; } if (super->fragment_table_start >= super->bytes_used) { -- cgit v1.2.3