mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
journal: fix bad memory access
This commit is contained in:
parent
a536e2613f
commit
ecf68b1d38
@ -1300,7 +1300,7 @@ static int generic_array_bisect_plus_one(JournalFile *f,
|
||||
|
||||
r = generic_array_bisect(f, first, n-1, needle, test_object, direction, ret, offset, idx);
|
||||
|
||||
if (r > 0)
|
||||
if (r > 0 && idx)
|
||||
(*idx) ++;
|
||||
|
||||
return r;
|
||||
|
Loading…
Reference in New Issue
Block a user