Date: Fri, 29 Dec 2017 14:56:46 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327343 - head/lib/libc/locale Message-ID: <201712291456.vBTEukI4064216@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Fri Dec 29 14:56:46 2017 New Revision: 327343 URL: https://svnweb.freebsd.org/changeset/base/327343 Log: libc/locale: fix an off-by-one in newlocale Reported by: zrj@DragonFlyBSD.org Modified: head/lib/libc/locale/xlocale.c Modified: head/lib/libc/locale/xlocale.c ============================================================================== --- head/lib/libc/locale/xlocale.c Fri Dec 29 14:31:43 2017 (r327342) +++ head/lib/libc/locale/xlocale.c Fri Dec 29 14:56:46 2017 (r327343) @@ -275,7 +275,7 @@ locale_t newlocale(int mask, const char *locale, local for (type=0 ; type<XLC_LAST ; type++) { if (mask & 1) { if (useenv) { - realLocale = __get_locale_env(type); + realLocale = __get_locale_env(type + 1); } new->components[type] = constructors[type](realLocale, new);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712291456.vBTEukI4064216>