diff options
author | Samanta Navarro <ferivoz@riseup.net> | 2021-07-26 13:36:28 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2021-07-26 14:37:58 +0300 |
commit | 41a6e4c247e68e906bea1ca7c31f0e8d3b49bc83 (patch) | |
tree | 8966b8f614a754e3a1f3ed2eae6a756d3c9a3539 /test/basic.installed2 | |
parent | 0eac0ed5f5575e4e115cc6a002b05e59d7f98f55 (diff) | |
download | apk-tools-41a6e4c247e68e906bea1ca7c31f0e8d3b49bc83.tar.gz apk-tools-41a6e4c247e68e906bea1ca7c31f0e8d3b49bc83.tar.bz2 apk-tools-41a6e4c247e68e906bea1ca7c31f0e8d3b49bc83.tar.xz apk-tools-41a6e4c247e68e906bea1ca7c31f0e8d3b49bc83.zip |
db: fix installed db writing with long names
Packages containing files with path names longer than 1024 characters
cannot fit into the buffer which is used to write "installed" database.
This leads to bbuf being APK_BLOB_NULL in apk_db_write_fdb because
apk_blob_push_blob notices the condition and correctly handles it.
The problem occurs when arguments to apk_ostream_write are manually
calculated by pointer arithmetics. Since bbuf.ptr is NULL in such a
case, bbuf.ptr - buf leads to a huge size value while buf still points
into the stack.
fixes #10751
[TT: minor edit to commit and abbreviating the commit message]
Diffstat (limited to 'test/basic.installed2')
0 files changed, 0 insertions, 0 deletions