Skip to content

hawkbit-client: add strptime() error check#220

Open
Bastian-Krause wants to merge 1 commit into
rauc:masterfrom
Bastian-Krause:bst/striptime-check
Open

hawkbit-client: add strptime() error check#220
Bastian-Krause wants to merge 1 commit into
rauc:masterfrom
Bastian-Krause:bst/striptime-check

Conversation

@Bastian-Krause

Copy link
Copy Markdown
Member

Check for strptime() parsing failures, issue a warning and return the default config retry_wait value. We should not run into such issues since the value is hawkBit-controlled, but better be safe than sorry.

While at it, initialize the tm struct, so reading unfilled fields does not lead to undefined behavior. This is for good measure only since %T fills all fields currently used.

Check for strptime() parsing failures, issue a warning and return the
default config `retry_wait` value. We should not run into such issues
since the value is hawkBit-controlled, but better be safe than sorry.

While at it, initialize the tm struct, so reading unfilled fields does
not lead to undefined behavior. This is for good measure only since %T
fills all fields currently used.

Signed-off-by: Bastian Krause <bst@pengutronix.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants