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

amqp_parse_url does not initialize amqp_connection_info #319

Closed
chjong opened this issue Oct 23, 2015 · 1 comment
Closed

amqp_parse_url does not initialize amqp_connection_info #319

chjong opened this issue Oct 23, 2015 · 1 comment
Labels
Milestone

Comments

@chjong
Copy link

chjong commented Oct 23, 2015

In amqp_parse_url(), parameter amqp_connection_info's ssl is not initialized.
Therefore, if the value is other than 0 (i.e., true), the offset calculation of user part will be incorrect. For example, user mike will be parsed as ike.

The fix will be to put parsed->ssl = 1 in the beginning of amqp_parse_url().

@alanxz
Copy link
Owner

alanxz commented Oct 25, 2015

The semantics of amqp_parse_url() aren't well defined if the input contains garbage.

As a workaround for the moment make sure that the amqp_connection_info object that is passed is either zero-initialized (with memset()) or amqp_default_connection_info().

@alanxz alanxz added the t:bug label Oct 25, 2015
@alanxz alanxz added this to the v0.8.0 milestone Oct 25, 2015
alanxz added a commit that referenced this issue Oct 25, 2015
amqp_parse_url() calls amqp_default_connection_info() to initialize the output
parameter to sensible defaults that mirror what the Java and .NET do.

Fixes #319
alanxz added a commit that referenced this issue Oct 25, 2015
amqp_parse_url() calls amqp_default_connection_info() to initialize the output
parameter to sensible defaults that mirror what the Java and .NET do.

Fixes #319
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants