summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoman Buchert <[email protected]>2026-07-21 21:16:55 +0200
committerRoman Buchert <[email protected]>2026-07-24 11:11:14 +0200
commit4e22ba55bcea03cb70fc0e08fabe20bc1a859c6d (patch)
tree8df66455f2ecee66b79ff21c3c335631e9b0995e /src
parent679489ccebecae836b943ad00b22314e1e3bab0b (diff)
Potential fix for pull request finding
Good catch. `configured` must be initialized explicitly because the context storage is not guaranteed to be zero-initialized at this point. I will set it to `false` in `raw_gadget_context_table_create()` and review the remaining context fields for the same issue. Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/portable/linux/raw_gadget/raw_gadget_context.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/portable/linux/raw_gadget/raw_gadget_context.c b/src/portable/linux/raw_gadget/raw_gadget_context.c
index 51eb75cf3..e45125a57 100644
--- a/src/portable/linux/raw_gadget/raw_gadget_context.c
+++ b/src/portable/linux/raw_gadget/raw_gadget_context.c
@@ -120,6 +120,7 @@ raw_gadget_result_t raw_gadget_context_table_create(size_t context_count)
context->ep0_accumulated_length = 0;
context->ep0_buffer = NULL;
context->ep0_buffer_capacity = 0;
+ context->configured = false;
context->transfer_generation = 0;
context->event_callback = NULL;
raw_gadget_endpoints_reset(context);