[DragonFlyBSD - Bug #3083] (New) crypto/openssh/auth2-pubkey.c:186]: (style) Suspicious condition

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Tue Oct 17 09:36:25 PDT 2017


Issue #3083 has been reported by dcb.

----------------------------------------
Bug #3083: crypto/openssh/auth2-pubkey.c:186]: (style) Suspicious condition
http://bugs.dragonflybsd.org/issues/3083

* Author: dcb
* Status: New
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------

crypto/openssh/auth2-pubkey.c:186]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

Source code is

           if ((r = sshbuf_put_cstring(b, "publickey")) != 0 ||
                (r = sshbuf_put_u8(b, have_sig)) != 0 ||
                (r = sshbuf_put_cstring(b, pkalg) != 0))

Maybe better code

            if ((r = sshbuf_put_cstring(b, "publickey")) != 0 ||
                (r = sshbuf_put_u8(b, have_sig)) != 0 ||
                (r = sshbuf_put_cstring(b, pkalg)) != 0)




-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Bugs mailing list