[PATCH] Fix input validation issues in llvm-as/llvm-dis
Alexey Samsonov
vonosmas at gmail.com
Thu May 7 21:38:36 PDT 2015
REPOSITORY
rL LLVM
================
Comment at: tools/llvm-as/llvm-as.cpp:67
@@ -66,2 +66,3 @@
int Len = IFN.length();
- if (IFN[Len-3] == '.' && IFN[Len-2] == 'l' && IFN[Len-1] == 'l') {
+ if (Len >= 3 && IFN[Len-3] == '.' && IFN[Len-2] == 'l' &&
+ IFN[Len-1] == 'l') {
----------------
Can you use StringRef::endswith(".ll") instead?
http://reviews.llvm.org/D9584
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list