summaryrefslogtreecommitdiff
path: root/src/journal/journal-file.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-07-12 17:36:24 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-13 00:32:32 +0200
commitecf68b1d3833c2ee3156a813ad42cf155dc4ace4 (patch)
tree76a55002ed69fc59b175377be52208715d22c6cf /src/journal/journal-file.c
parenta536e2613f278970b1ab11788caf1a9a51e1a103 (diff)
journal: fix bad memory access
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r--src/journal/journal-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index c468b22697..83f603ac82 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -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;