awslabs / aws-c-io

This is a module for the AWS SDK for C. It handles all IO and TLS work for application protocols.
Apache License 2.0
105 stars 58 forks source link

Fix sizeof channel negotiation task #631

Closed quinnj closed 4 months ago

quinnj commented 4 months ago

Noticed while running a client program that invoked aws_channel_setup_client_tls and subsequently had heap corruption errors. When running with ENABLE_SANITIZERS=ON, it produced a report that the negotiation_task was only being allocated with 64 bytes where as aws_channel_task_init called AWS_ZERO_STRUCT where it was trying to set 104 bytes to 0, thus over-running the original memory region.

waahm7 commented 4 months ago

Thank you for the fix! LGTM.

waahm7 commented 4 months ago

Released in https://github.com/awslabs/aws-c-io/releases/tag/v0.14.6.