Re: [PATCHv4] Read (but not write) from XDG configuration, XDG attributes and XDG ignore files
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 4, 2012, 18:41 UTC
- Message-ID
- <7v62b6udg1.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <4FCCF63B.8070609@ramsay1.demon.co.uk>
Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
Show 5 quoted lines
> Subject: [PATCH] path.c: Fix a static buffer overwrite bug by avoiding mkpath() > > In order to fix the bug, we introduce a new variation of the mkpath() > function, mkpathdup(), which avoids the use of the internal static > buffers.
Shouldn't we aim a bit higher to also avoid the use of bounded buffer? Instead of returning bad_path, retry with lengthened buffer until we succeed, or something.
Better yet, internally use strbuf_vaddf().