forked from OSchip/llvm-project
parent
4871067a55
commit
e195f9ce15
|
@ -91,8 +91,9 @@ bool StackProtector::runOnFunction(Function &Fn) {
|
||||||
|
|
||||||
Attribute Attr = Fn.getAttributes().getAttribute(
|
Attribute Attr = Fn.getAttributes().getAttribute(
|
||||||
AttributeSet::FunctionIndex, "stack-protector-buffer-size");
|
AttributeSet::FunctionIndex, "stack-protector-buffer-size");
|
||||||
if (Attr.isStringAttribute())
|
if (Attr.isStringAttribute() &&
|
||||||
Attr.getValueAsString().getAsInteger(10, SSPBufferSize);
|
Attr.getValueAsString().getAsInteger(10, SSPBufferSize))
|
||||||
|
return false; // Invalid integer string
|
||||||
|
|
||||||
++NumFunProtected;
|
++NumFunProtected;
|
||||||
return InsertStackProtectors();
|
return InsertStackProtectors();
|
||||||
|
|
Loading…
Reference in New Issue