Skip to content

Commit

Permalink
Merge pull request #1332 from ejoerns/fix-info-headers
Browse files Browse the repository at this point in the history
src/nbd: initialize info_headers to NULL
  • Loading branch information
jluebbe committed Jan 19, 2024
2 parents 12f2330 + f43075c commit 3de90e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ static void start_configure(struct RaucNBDContext *ctx, struct RaucNBDTransfer *

/* only read from the client on the first try */
if (!ctx->url) {
GStrv info_headers; /* array of strings such as 'Foo: bar' */
GStrv info_headers = NULL; /* array of strings such as 'Foo: bar' */

res = r_read_exact(ctx->sock, (guint8*)data, xfer->request.len, NULL);
g_assert_true(res);
Expand Down
5 changes: 5 additions & 0 deletions test/rauc.t
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ test_expect_success "rauc info (verity, adaptive, meta)" "
info ${SHARNESS_TEST_DIRECTORY}/good-adaptive-meta-bundle.raucb
"

test_expect_success STREAMING "rauc info (streaming)" "
rauc --keyring $SHARNESS_TEST_DIRECTORY/openssl-ca/dev-ca.pem \
info http://127.0.0.1/test/good-verity-bundle.raucb
"

test_expect_success "rauc info (casync, plain)" "
cp -L ${SHARNESS_TEST_DIRECTORY}/good-casync-bundle-1.5.1.raucb ${TEST_TMPDIR}/ &&
test_when_finished rm -f ${TEST_TMPDIR}/good-casync-bundle-1.5.1.raucb &&
Expand Down

0 comments on commit 3de90e4

Please sign in to comment.