diff options
author | jiankang.fan <jiankang.fan@samsung.com> | 2020-08-21 14:52:50 +0900 |
---|---|---|
committer | jiankang.fan <jiankang.fan@samsung.com> | 2020-08-21 15:01:27 +0900 |
commit | e4e49b101522f46f0c2b8acd55554866f1bd37bc (patch) | |
tree | 4a43b456a26399e9dcf233e37350e127729eb9ea | |
parent | fc3c4a93a6e665927ec495cc52130fbb87e35c7c (diff) | |
download | rpm-e4e49b101522f46f0c2b8acd55554866f1bd37bc.tar.gz rpm-e4e49b101522f46f0c2b8acd55554866f1bd37bc.tar.bz2 rpm-e4e49b101522f46f0c2b8acd55554866f1bd37bc.zip |
Fix the issue for [ASAN][BUG] stack-use-after-scope in crash-manager on TM1submit/tizen_base/20201123.090647submit/tizen_base/20200825.071216submit/tizen_6.0_base/20201123.091612accepted/tizen/base/tool/20201125.225050accepted/tizen/6.0/base/tool/20201125.224919accepted/tizen/6.0/base/20230713.143043accepted/tizen_6.0_base_tool
https://code.sec.samsung.net/jira/browse/TSIX-3628
The external pointer(keyp) refers to a local variable(mi_offset),
but beyond the scope of the local variable, the pointer is still referenced.
Change-Id: I2a9ee984e3e290a8f41c7d3cf4444786e087c41b
Signed-off-by: jiankang.fan <jiankang.fan@samsung.com>
-rw-r--r-- | lib/rpmdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rpmdb.c b/lib/rpmdb.c index 76425b4ca..c22c98aa8 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -1816,9 +1816,9 @@ Header rpmdbNextIterator(rpmdbMatchIterator mi) top: uh = NULL; uhlen = 0; + union _dbswap mi_offset; do { - union _dbswap mi_offset; if (mi->mi_set) { if (!(mi->mi_setx < mi->mi_set->count)) |