projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f4ad53
)
sd-journal: check retval of sd_id128_from_string call
author
Shreenidhi Shedi
<sshedi@vmware.com>
Tue, 14 Jun 2022 04:58:37 +0000
(10:28 +0530)
committer
Shreenidhi Shedi
<sshedi@vmware.com>
Tue, 14 Jun 2022 12:22:48 +0000
(17:52 +0530)
Fixes: CID#
1469712
CID
1469712
(#1 of 1): Unused value (UNUSED_VALUE)
returned_value: Assigning value from sd_id128_from_string(word + 2, &boot_id) to r here,
but that stored value is overwritten before it can be used.
src/libsystemd/sd-journal/sd-journal.c
patch
|
blob
|
history
diff --git
a/src/libsystemd/sd-journal/sd-journal.c
b/src/libsystemd/sd-journal/sd-journal.c
index 5138993f0561ab59759c5607a889367f02ac1381..4a9f1a90b2f3edaed07601d1ab3d47b1ddf38eea 100644
(file)
--- a/
src/libsystemd/sd-journal/sd-journal.c
+++ b/
src/libsystemd/sd-journal/sd-journal.c
@@
-987,6
+987,8
@@
_public_ int sd_journal_seek_cursor(sd_journal *j, const char *cursor) {
case 'b':
boot_id_set = true;
r = sd_id128_from_string(word + 2, &boot_id);
+ if (r < 0)
+ return r;
break;
case 'm':