Re: strbuf API
- From
Matthieu Moy <matthieu.moy@imag.fr>
- Date
- Sep 3, 2007, 09:02 UTC
- Message-ID
- <vpq8x7om89p.fsf@bauges.imag.fr>
- In-Reply-To
- <20070903084927.GB21759@artemis.corp>
Pierre Habouzit <madcoder@debian.org> writes:
> Indeed, OTHO doing that would be pretty silly, as embending NULs in a > strbuf is wrong, it's a _str_buf, not a random-binary-buffer.
I see nothing in strbuf that prevents you from embedding '\0' in it. And the git code calls read_line on stdin, which may well contain '\0'. So, either I missed something, or strbuf can contain '\0', or the git code is not robust to null-characters on stdin, and should be fixed.
-- Matthieu