[PATCH] D84050: YAML: Don't assume an arbitrary StringRef is null terminated

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 09:39:45 PST 2020


scott.linder updated this revision to Diff 304874.
scott.linder added a comment.

Restore the correct behavior of `Scanner::scanAliasOrAnchor`, last version of the patch mistakenly changed `Token.Range` when only intending to fix the error checking around an empty alias/anchor.

I think this version now removes the assumption that `End` points to a dereferencable `'\0'`, but I'm not sure how to go about testing this comprehensively.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84050/new/

https://reviews.llvm.org/D84050

Files:
  llvm/lib/Support/YAMLParser.cpp
  llvm/unittests/Support/YAMLIOTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84050.304874.patch
Type: text/x-patch
Size: 4863 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201112/d2df8839/attachment.bin>


More information about the llvm-commits mailing list