all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: emacs-devel@gnu.org
Subject: Re: [PATCH] gnutls: Add SNI support
Date: Mon, 24 Nov 2014 21:56:25 +0100	[thread overview]
Message-ID: <87k32kz5ae.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <87oarwhjem.fsf@zigzag.favinet> (Thien-Thi Nguyen's message of "Mon, 24 Nov 2014 13:28:49 +0100")

* Thien-Thi Nguyen:

>    +  /* Quick and dirty test of the hostname; shouldn't be an IP. If it
>    +     contains letters, we assume it's a hostname, unless it contains a
>    +     : in which case we assume it's a literal IPv6 address. */
>    +  for(c = c_hostname; c; c++) {
>    +    if(c >= 'a') send_hostname = 1;
>    +    if(c == ':') {send_hostname = 0; break;}
>    +  }
>
> Aside from the whitespace and brace placement, this code is buggy: ‘c’
> is of type ‘char *’ and cannot be meaningfully compared directly to 'a'.

And what about uppercase names?  Or domain names which do not contain
letters?

(I think to be absolutely correct, you need to track the kind of name
resolution you have performed on the name.)



  parent reply	other threads:[~2014-11-24 20:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24 12:17 [PATCH] gnutls: Add SNI support Toke Høiland-Jørgensen
2014-11-24 12:28 ` Thien-Thi Nguyen
2014-11-24 13:08   ` Toke Høiland-Jørgensen
2014-11-24 14:50     ` Lars Magne Ingebrigtsen
2014-11-24 20:56   ` Florian Weimer [this message]
2014-11-24 12:33 ` Jérémie Courrèges-Anglas
2014-11-26 21:52 ` Lars Magne Ingebrigtsen
2014-11-26 22:12   ` Lars Magne Ingebrigtsen
2014-11-27  9:01   ` Toke Høiland-Jørgensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k32kz5ae.fsf@mid.deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.