Skip to content

Commit

Permalink
Do not interpret string formatting twice
Browse files Browse the repository at this point in the history
Caught by `-Wformat-security`.

Fixes: 2b7e161 date and time UPDATE gross errors check
  • Loading branch information
jktjkt authored and michalvasko committed Aug 9, 2023
1 parent 63ce73a commit 2ec0d8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins_types/date_and_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ lyplg_type_store_date_and_time(const struct ly_ctx *ctx, const struct lysc_type
/* convert to UNIX time and fractions of second */
ret = ly_time_str2time(value, &val->time, &val->fractions_s);
if (ret) {
ret = ly_err_new(err, ret, 0, NULL, NULL, ly_last_errmsg());
ret = ly_err_new(err, ret, 0, NULL, NULL, "%s", ly_last_errmsg());
goto cleanup;
}

Expand Down

0 comments on commit 2ec0d8f

Please sign in to comment.