History log of /system/core/libsparse/backed_block.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c227a1d855cb6ab86d4927c0231cd8d3afbc957d 21-Aug-2015 lei wang wang <leiwang211@gmail.com> 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
/system/core/libsparse/backed_block.c
14e28d39f7f094225c1ddae8fa43bd792c621a8f 29-Oct-2013 Elliott Hughes <enh@google.com> Fix a bunch of small system/core bugs.

Missing frees in:
adb/file_sync_client.c
fastboot/fastboot.c
libsparse/output_file.c

Missing closedirs in:
adb/file_sync_service.c
cpio/mkbootfs.c
libcutils/dir_hash.c

Potential buffer overrun in:
gpttool/gpttool.c

Incorrect NULL check in:
libsparse/backed_block.c

Bug: https://code.google.com/p/android/issues/detail?id=61564
Change-Id: If97838a9e73a77aef7f416c31c237ce1fca4ce21
/system/core/libsparse/backed_block.c
bdc6d39ed6c09199a5d806f29b71b44cbb27c5c2 03-May-2012 Colin Cross <ccross@android.com> libsparse: add function to resparse a file and a utility to use it

Add sparse_file_repsarse, which splits chunks in an existing sparse
file such that the maximum size of a chunk, plus a header and footer,
is smaller than the given size. This will allow multiple smaller
sparse files to result in the same data as a large sparse file.

Change-Id: I177abdb958a23d5afd394ff265c5b0c6a3ff22fa
/system/core/libsparse/backed_block.c
be8ddcb35a459481c0bcf5bfe645c1fefe963f5c 26-Apr-2012 Colin Cross <ccross@android.com> libsparse: merge adjacent blocks of the same type

When a block is added that is adjacent to another block and of the same
type, merge it. This will be useful for converting regular images to
sparse images, allowing the reader to add a single block at a time and
letting libsparse optimize into larger blocks as it goes.

Does not support merge two blocks that are backed by a data pointer,
only blocks that are backed by a file for now.

Change-Id: I95aa231714cbe01ac194e868c21385806c0bdb97
/system/core/libsparse/backed_block.c
9e1f17e926fa20255c5f4b4d2f68aa98a964253a 26-Apr-2012 Colin Cross <ccross@android.com> libsparse: add support for including fds

Add sparse_file_add_fd to include all or part of the contents
of an fd in the output file. Will be useful for re-sparsing files
where fd will point to the input sparse file.

Change-Id: I5d4ab07fb37231e8e9c1912f62a2968c8b0a00ef
/system/core/libsparse/backed_block.c
b55dceea986ab24f8b836b5116b389ed619c816e 25-Apr-2012 Colin Cross <ccross@android.com> libsparse: cleanups

Move block loops into sparse.c with iterator helpers in backed_block.c.
Simplify chunk writing by moving skip chunk calls from output_file.c to
sparse.c.
Rename variables to be consistent with new naming.
Remove use of u8, u32, u64.

Change-Id: Ic138ad58bef9f96239266ccee12ee83ea285e7eb
/system/core/libsparse/backed_block.c
411619e921904b896eddae81c086c1f687c8304d 25-Apr-2012 Colin Cross <ccross@android.com> libsparse: remove static variables

Removes static variables in backed_block.c to allow multiple
sparse files to be open at the same time.

Change-Id: I012d8a424c6e21a7352408416adb7c72ee8add21
/system/core/libsparse/backed_block.c
28fa5bc347390480fe190294c6c385b6a9f0d68b 20-May-2012 Colin Cross <ccross@android.com> system/core: move libsparse into system/core

This moves an exact copy of libsparse from
system/extras/ext4_utils/libsparse to system/core/libsparse in
preparation for linking tools in system/core against it.

Change-Id: If664e4fcfd6612844ac745589beb1517e7f9fe58
/system/core/libsparse/backed_block.c