curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: wildcard matching

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 28 Jan 2018 23:58:44 +0100 (CET)

On Sun, 28 Jan 2018, Daniel Stenberg wrote:

> Yes, I noticed this too and it is highly annoying since it now keeps making
> our CI builds red. I tried to reproduce it on my Mac but for some reason it
> doesn't fail when I run it! :-/

I managed to trigger the bug on macos now. It turns out ISALNUM() returns TRUE
on macos and FALSE on Linux when given the char 'ΓΏ' (0xc3) as input.

Further, isalnum() is apparently depending on locale. Both my Linux and macos
machines use the en_US.UTF-8 locale. However, if I set "LANG=C" before I run
unit1307, the test case no longer fails!

I'm afraid there's but one conclusion to draw from this: we need to make and
use a custom isalnum() function for this. And to be really sure I figure we
should cover the other is*() macros as well as they may very well contain the
same sort of weaknesses.

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-01-29