News for hackers. Stuff that matters.
Re:Null pointer dereference – new security bug for OpenSSL by ams6110 on Thursday May 01, 2014 @11:21PM (#7683976)
That patch is set up for a later bug to be introduced: no brackets on the if statements.

Instead of:

  +		if (wb->buf == NULL)
  +			if (!ssl3_setup_write_buffer(s))
  +				return -1;
Why not:

  +		if (wb->buf == NULL) {
  +			if (!ssl3_setup_write_buffer(s)) {
  +				return -1;
  +			}
  +		}
Re:Null pointer dereference – new security bug for OpenSSL by insaneirish on Thursday May 01, 2014 @11:39PM (#7684021)
This is OpenBSD Kernel Normal Form (http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9).

Disagree you may, but it's consistent with their self-imposed guidelines.

Re:Null pointer dereference – new security bug for OpenSSL by codezero on Sunday May 04, 2014 @03:45AM (#7693659)
Sort of. They say only if it's a single line that it's not allowed. If there are multiple lines it's "permitted."

So technically, this is still OK, but they are allowed to use braces when there are multiple lines. (the if and the return) They have an example in that link that covers this as a permitted case, but as you say, it's OK and consistent, but that doesn't make it good :)

Re:Null pointer dereference – new security bug for OpenSSL by codezero on Thursday May 01, 2014 @11:38PM (#7684019)
or

  if ((wb->buf == NULL) && !ssl3_setup_write_buffer(s)) {
     return -1;
  }
Re:Null pointer dereference – new security bug for OpenSSL by ibotty on Friday May 02, 2014 @02:35AM (#7684367)
this is getting boring. ever time a patch using no parentheses shows up there is that comment. if all your code uses that style you get used to it. feel free to show evidence of openbsd making that mistake once! (there might have been those, but i am sure it's going to be very hard to find).
Re:Null pointer dereference – new security bug for OpenSSL by nextw33k on Friday May 02, 2014 @07:39AM (#7685084)
Perhaps you need to consider the bigger picture. The biggest part of being a programmer is not in how many characters we write but in how we are able to know and understand abstract concepts.

If writing defensively by always putting braces around if statements means we no longer have to consider the possibility of a fall through error, then that saves mental processing for you and more importantly for lesser programmers.