Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2023.8-3 coverity minor fixes #3263

Closed
wants to merge 10 commits into from
7 changes: 4 additions & 3 deletions src/libostree/ostree-repo-static-delta-processing.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,11 @@ dispatch_bspatch (OstreeRepo *repo, StaticDeltaExecutionState *state, GCancellab
struct bspatch_stream stream;
stream.read = bspatch_read;
stream.opaque = &opaque;
if (bspatch ((const guint8 *)g_mapped_file_get_contents (input_mfile),
g_mapped_file_get_length (input_mfile), buf, state->content_size, &stream)
g_autofree const guint8 *old = (const guint8 *)g_mapped_file_get_contents (input_mfile);
if (bspatch (old, g_mapped_file_get_length (input_mfile), buf,
state->content_size, &stream)
< 0)
return glnx_throw (error, "bsdiff patch failed");
return glnx_throw (error, "bsdiff patch failed");
lukewarmtemp marked this conversation as resolved.
Show resolved Hide resolved

if (!_ostree_repo_bare_content_write (repo, &state->content_out, buf, state->content_size,
cancellable, error))
Expand Down