Skip to content

Commit 6bd461a

Browse files
sshedikeszybz
authored andcommitted
sd-journal: check retval of sd_id128_from_string call
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. (cherry picked from commit c9f5ac0) (cherry picked from commit 73a327d)
1 parent f2b1c27 commit 6bd461a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libsystemd/sd-journal/sd-journal.c

+2
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,8 @@ _public_ int sd_journal_seek_cursor(sd_journal *j, const char *cursor) {
989989
case 'b':
990990
boot_id_set = true;
991991
r = sd_id128_from_string(word + 2, &boot_id);
992+
if (r < 0)
993+
return r;
992994
break;
993995

994996
case 'm':

0 commit comments

Comments
 (0)