[PATCH] Fixing a memory corruption bug in string escaping

Reid Kleckner rnk at google.com
Tue Apr 30 19:40:26 PDT 2013


LGTM

Aren't C strings awesome?  =/

On Tue, Apr 30, 2013 at 6:03 PM, Aaron Ballman <aaron at aaronballman.com> wrote:
> There was a buffer overrun bug introduced in Programs.inc where the
> buffer allocated with alloca wasn't large enough to accommodate the
> closing quote escape rules in some instances.    The
> CreateProcessTrailingSlash test in ProgramTest.cpp pointed out the
> issue in debug builds from MSVC.
>
> This patch addresses the issue by accounting for any escapes that
> happen prior to the trailing quote (this escaping happens on line 239
> but was not happening when calculating the length of the string).
>
> ~Aaron



More information about the llvm-commits mailing list