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

mqtt_publish return value causes mqtt_error_str when not connected #153

Open
infn-ke opened this issue Jan 13, 2022 · 0 comments
Open

mqtt_publish return value causes mqtt_error_str when not connected #153

infn-ke opened this issue Jan 13, 2022 · 0 comments

Comments

@infn-ke
Copy link

infn-ke commented Jan 13, 2022

Invoking mqtt_publish without being in a connected state gives a negative return value. Passing this return value into mqtt_error_str causes a SEGV.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff756a35c in mqtt_error_str (error=-1094795586) at /usr/local/src/mqtt-c/src/mqtt.c:1773
1773            return MQTT_ERRORS_STR[offset];

Unfortunately MQTT_CLIENT_TRY_PACK is a macro so cannot get better backtrace without replacing it with a function.

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

No branches or pull requests

1 participant