bugfix: heimdal interaction, check length
authorPhil Pennock <pdp@exim.org>
Mon, 9 Apr 2018 21:49:57 +0000 (17:49 -0400)
committerPhil Pennock <pdp@exim.org>
Mon, 9 Apr 2018 21:49:57 +0000 (17:49 -0400)
clang noted that taking the address of a struct member will never be 0,
so checking against 0 was wrong.  It was a `.length` member.  I've
compiled RC4 with this change and deployed it to my box and I can still
authenticate fine.

src/src/auths/heimdal_gssapi.c

index c0611b89560f3711adee294185a4cba1ddadcec6..eafdccc5ca7b42ad8ce56c400b64cd1614b67471 100644 (file)
@@ -357,7 +357,7 @@ auth_heimdal_gssapi_server(auth_instance *ablock, uschar *initial_data)
           error_out = FAIL;
           goto ERROR_OUT;
         }
-        if (&gbufdesc_out.length != 0) {
+        if (gbufdesc_out.length != 0) {
           error_out = auth_get_data(&from_client,
               gbufdesc_out.value, gbufdesc_out.length);
           if (error_out != OK)