diff options
| author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-02-08 11:17:20 +0000 |
|---|---|---|
| committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-02-08 11:17:20 +0000 |
| commit | 87c43537df4bd83b26ebab877721ba24a9ee3685 (patch) | |
| tree | 1e2f1a280cb2b8351801840aeca143688460d749 /llvm/lib/CodeGen/BasicTargetTransformInfo.cpp | |
| parent | acc33666f6218a55421eb6e3ccd116012c23d3d7 (diff) | |
| download | llvm-87c43537df4bd83b26ebab877721ba24a9ee3685.zip llvm-87c43537df4bd83b26ebab877721ba24a9ee3685.tar.gz llvm-87c43537df4bd83b26ebab877721ba24a9ee3685.tar.bz2 | |
[sanitizer] Improve scanf interceptor
This a rewrite of the scanf parser. The new implementation is pretty close to
the spec, with a few shortcuts taken here and there. It is conservative, i.e.
it gives up parsing if it does not understand some part of the format string,
or runs into an ambiguous % spec. It does not handle some rarely used parts of
the spec, like %n$ - for now.
I'm also moving parser call to after the original *scanf function completes,
so that we can find out the store size of %s directive by the use of strlen()
on the target buffer.
llvm-svn: 174704
Diffstat (limited to 'llvm/lib/CodeGen/BasicTargetTransformInfo.cpp')
0 files changed, 0 insertions, 0 deletions
