Skip to content
Commit bc18a9a7 authored by Daekeun Kang's avatar Daekeun Kang Committed by Anas Nashif
Browse files

net: fix handle unaligned memory access in net_context_bind()



This commit addresses an issue in net_context_bind() where unaligned
memory access was not properly handled when checking for INADDR_ANY.
The problem primarily affected MCUs like ARMv6 that don't support
unaligned memory access.

- Use UNALIGNED_GET() to safely access the sin_addr.s_addr field
- Ensures correct behavior on architectures with alignment restrictions

This fix improves compatibility and prevents potential crashes or
unexpected behavior on affected platforms.

Signed-off-by: default avatarDaekeun Kang <dkkang@huconn.com>
(cherry picked from commit b24c5201)
parent 5e4e4bf5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment