Skip to content
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

Fix double-free throughout amqp_definitions #447

Merged
merged 1 commit into from Jan 22, 2024
Merged

Conversation

ewertons
Copy link
Collaborator

@ewertons ewertons commented Jan 22, 2024

This is related to issue 84965 (work item 186232).

The bugs identified in open_get_offered_capabilities are correct. open_get_offered_capabilities is implemented in amqp_definitions.c, which is autogenerated from amqp_definitions_c.tt. amqp_definitions_c.tt is also used to autogerate functions for other AMQP composite types. By fixing amqp_definitions_c.tt (function in lines 317 to 494) this double-free bug pattern is being addressed for:

  • open_get_outgoing_locales
  • open_get_incoming_locales
  • open_get_offered_capabilities
  • open_get_desired_capabilities
  • begin_get_offered_capabilities
  • begin_get_desired_capabilities
  • attach_get_offered_capabilities
  • attach_get_desired_capabilities
  • sasl_mechanisms_get_sasl_server_mechanisms
  • source_get_outcomes
  • source_get_capabilities
  • target_get_capabilities

@ericwol-msft ericwol-msft changed the title Fix double-free throughout amqp_definitions caught by MSRC Fix double-free throughout amqp_definitions Jan 22, 2024
@@ -19,8 +19,8 @@ namespace amqplib_generator
/// Class to produce the template output
/// </summary>

#line 1 "g:\repos\azure-event-hubs-c\deps\azure-uamqp-c\uamqp_generator\amqp_definitions_c.tt"
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")]
#line 1 "C:\code\s1\azure-uamqp-c\uamqp_generator\amqp_definitions_c.tt"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this get changed to your local path?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's normal for the amqp_definitions. Whoever updates it most recently gets those paths updated to their local paths. The VS text-template engine does that automatically.

This is related to issue 84965 (work item 186232).

The bugs identified in open_get_offered_capabilities are correct.
open_get_offered_capabilities is implemented in amqp_definitions.c, which is autogenerated from amqp_definitions_c.tt.
amqp_definitions_c.tt is also used to autogerate functions for other AMQP composite types.
By fixing amqp_definitions_c.tt (function in lines 317 to 494) this double-free bug pattern is being addressed for:
- open_get_outgoing_locales
- open_get_incoming_locales
- open_get_offered_capabilities
- open_get_desired_capabilities
- begin_get_offered_capabilities
- begin_get_desired_capabilities
- attach_get_offered_capabilities
- attach_get_desired_capabilities
- sasl_mechanisms_get_sasl_server_mechanisms
- source_get_outcomes
- source_get_capabilities
- target_get_capabilities
@ewertons ewertons merged commit 60904f8 into master Jan 22, 2024
16 checks passed
@ewertons ewertons deleted the ewertons/MSRC84965 branch January 22, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants