-
Notifications
You must be signed in to change notification settings - Fork 15
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
meta-lxatac-bsp: rauc: add patch to fix RAUC info / update notifications #98
Merged
+39
−0
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
meta-lxatac-bsp/recipes-core/rauc/files/0001-src-nbd-initialize-info_headers-to-NULL.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From 967d32571e226d15c345b2d8cec932a651716f4b Mon Sep 17 00:00:00 2001 | ||
From: Enrico Jorns <ejo@pengutronix.de> | ||
Date: Thu, 18 Jan 2024 16:49:46 +0100 | ||
Subject: [PATCH] src/nbd: initialize info_headers to NULL | ||
|
||
When g_variant_dict_lookup() does not find the given key, it does not | ||
modify the values of the arguments provided. | ||
|
||
This results in info_headers being undefined and can cause the | ||
rauc-nbd-server to crash, which will result in a broken request on | ||
client side that lets RAUC terminate hard with: | ||
|
||
(rauc:769): rauc-nbd-ERROR **: 15:40:30.553: failed to recv nbd config reply header | ||
|
||
The behavior of g_variant_dict_lookup() has also recently been clarified | ||
in the glib documentation: | ||
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3334 | ||
|
||
Upstream-Status: Submitted [https://github.com/rauc/rauc/pull/1332] | ||
|
||
Signed-off-by: Enrico Jorns <ejo@pengutronix.de> | ||
--- | ||
src/nbd.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/nbd.c b/src/nbd.c | ||
index 41c43b3..018022e 100644 | ||
--- a/src/nbd.c | ||
+++ b/src/nbd.c | ||
@@ -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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to add an Upstream-Status like: