On Wed, 2017-01-18 at 15:57 +0000, Adel Boutros wrote: > Hello, > > > I am actually testing the python bindings as described here [1]. I > managed to launch the tests and have hit a new problem. > > > There is a class called pni_sasl_t in "sasl-internal.h". This struct > has a lot of members which are pointers and set to NULL. > > > In the python test > "proton_tests.sasl.SASLEventTest.testDisallowedMechClient", we arrive > to a point where we call proton::transport.pending() which will > arrive to "pni_post_sasl_frame" in proton-c/src/sasl/sasl.c and > trigger an expected error: > > > case SASL_RECVED_OUTCOME_FAIL: > pn_do_error(transport, "amqp:unauthorized-access", > "Authentication failed [mech=%s]", transport->sasl- > >selected_mechanism); > desired_state = SASL_ERROR; > break; > > However, "transport->sasl->selected_mechanism" is NULL and vsnprintf > (in pn_do_error) cannot print a NULL. Thus it crushes.
This is definitely a bug. We should never be trying to dereference a null pointer (even if the Linux implementation of printf() is smart enough to avoid this). Andrew --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
