git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199716
91177308-0d34-0410-b5e6-
96231b3b80d8
Attribute Attr = Fn.getAttributes().getAttribute(
AttributeSet::FunctionIndex, "stack-protector-buffer-size");
Attribute Attr = Fn.getAttributes().getAttribute(
AttributeSet::FunctionIndex, "stack-protector-buffer-size");
- if (Attr.isStringAttribute())
- Attr.getValueAsString().getAsInteger(10, SSPBufferSize);
+ if (Attr.isStringAttribute() &&
+ Attr.getValueAsString().getAsInteger(10, SSPBufferSize))
+ return false; // Invalid integer string
++NumFunProtected;
return InsertStackProtectors();
++NumFunProtected;
return InsertStackProtectors();