![]() |
|
Message-Id: <DCIKUYG9INVL.276ZJXJCA81C2@posteo.net> Date: Tue, 02 Sep 2025 19:56:18 +0000 From: "Sertonix" <sertonix@...teo.net> To: <musl@...ts.openwall.com> Subject: unreliable/unused mbstowcs check in is_valid_hostname Inside of is_valid_hostname there is a mbstowcs(0, host, 0) == -1 check. It seems like the next line validates the characters so checking for invalid multibyte sequence shouldn't be needed. And as far as I can tell 1507ebf83733 + f22a9edaf8a6 made mbstowcs never returns -1 when CURRENT_UTF8 is false even though is_valid_hostname should probably not be local dependant. Before 2abb70c302ef the check was mbstowcs(0, host, 0) > 255 so maybe that commit was incorrect?
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.