On 20 February 2016 at 19:14, Duncan P. N. Exon Smith via cfe-commits
<cfe-commits@lists.llvm.org> wrote:
> Author: dexonsmith
> Date: Sat Feb 20 18:14:36 2016
> New Revision: 261461
>
> URL: http://llvm.org/viewvc/llvm-project?rev=261461&view=rev
> Log:
> Lex: Never overflow the file in HeaderMap::lookupFilename()
>
> If a header map file is corrupt, the strings in the string table may not
> be null-terminated.  The logic here previously relied on `MemoryBuffer`
> always being null-terminated, but this isn't actually guaranteed by the
> class AFAICT.

Depends on the constructor used. Note the RequiresNullTerminator
parameter. It exists because it apparently makes clang parsing faster
by allowing it to not check for the size all the time.

Cheers,
Rafael
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to