[Dnsmasq-discuss] [PATCH] cname no longer accepts trailing dot

Pali Rohár pali.rohar at gmail.com
Mon Feb 26 19:37:15 GMT 2018


On Monday 26 February 2018 19:59:53 Petr Menšík wrote:
> -	    for (arg += strlen(arg)+1; *arg == ' '; arg++);
> +	    for (arg += arglen+1; *arg && isspace(*arg); arg++);

Hi!

Just one note about this change. Function isspace() is implemented
according to current locale and basically every locale can have
different set of characters marked as "space". E.g. in C locale
isspace() function is truth not only for ASCII space (0x20), but also
e.g. for ASCII tab (0x09). Some people improperly use function isspace()
just because they think it matches only ASCII spaces (0x20).

Due to dependent on locale I would suggest to use explicit set of
characters... but that is just suggestion.

-- 
Pali Rohár
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20180226/72c86bd6/attachment.sig>


More information about the Dnsmasq-discuss mailing list