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

Skip to content
Commit c227a1d8 authored by lei wang wang's avatar lei wang wang Committed by Mark Salyzyn
Browse files

libsparse: use strcmp and validate last_used pointer

This patch is used to fix two Bugs in backed_block.c

First, fix wrong comparing string way: we should use strcmp rather than
just compare their address. Second, fix using illegal memory risk in
bbl->last_used pointer. When entering queue_bb function,
bbl->last_used = new_bb, but in the following code if
queue_bb(xx, bb, new_bb) return ok, the space of new_bb is released. So
next time, if you use bbl->last_used pointer, may cause segment fault !

Change-Id: I6abb505f9b903b697448639fc64fb7518df5cca1
parent dcf89091
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment