[Bug 221224] setlocale.c does not properly detect if locale contains too many slashes

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Aug 4 16:21:06 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221224

            Bug ID: 221224
           Summary: setlocale.c does not properly detect if locale
                    contains too many slashes
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: leonard.r.koenig at googlemail.com

Overview
There's a loop at [1] which tries to find the first character after a number of
consecutive slashes.  In line 164 i == _LC_LAST is checked which should be
always false at this location, since it was set to 1 a few lines before and
never changed since.
But even if i was not set in this loop, it'd still wouldn't make any sense,
since then i would always have the value _LC_LAST because of the very first
loop in the function.

Steps to Reproduce
call setlocale(LC_ALL, "/some////////string/");

Actual Results / Expected results:
Unclear

----

[1]
https://svnweb.freebsd.org/base/head/lib/libc/locale/setlocale.c?revision=314436&view=markup#l157

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list