Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #152950

Re: How many wide characters may mbstowcs store?

Path csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: How many wide characters may mbstowcs store?
Date Sun, 28 Jun 2020 06:32:18 -0700
Organization A noiseless patient Spider
Lines 15
Message-ID <864kqviae5.fsf@linuxsc.com> (permalink)
References <r9bd16$nbt$1@solani.org> <rd3uc8$sqv$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Info reader02.eternal-september.org; posting-host="ff34e83bcc6e4b254240f67d19971e6a"; logging-data="10742"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//Ol6ENp+TcOpmE6Cvwr5Fvl7M0xCxDIw="
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock sha1:vAErg2/dT+wTQHEm0uTD0LwqH/U= sha1:41J78j8Zy4kGMzMHtNE3pf4azIc=
Xref csiph.com comp.lang.c:152950

Show key headers only | View raw


Andrey Tarasevich <andreytarasevich@hotmail.com> writes:

> On 5/11/2020 4:30 AM, Philipp Klaus Krause wrote:
>
>> For wcstombs, the wording seems clear to state that it will stop at a
>> terminating 0, but for the mbstowcs it seems unclear to me.
>
> The issue is fairly similar to the one described here
>
> https://trust-in-soft.com/blog/2015/12/21/memcmp-requires-pointers-to-fully-valid-buffers/
>
> The question is whether `memcmp` is allowed to read beyond the first
> differing byte, while still within the specified buffer size.

The question is similar.  The answer isn't.

Back to comp.lang.c | Previous | NextPrevious in thread | Find similar


Thread

Re: How many wide characters may mbstowcs store? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2020-06-25 21:42 -0700
  Re: How many wide characters may mbstowcs store? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-06-28 06:32 -0700

csiph-web