зеркало из https://github.com/microsoft/clang-1.git
Fix buffer overrun when laying out synthesized ivars.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68634 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
b31ac22ed7
Коммит
4af44129dd
|
@ -679,7 +679,8 @@ ASTContext::getASTObjCInterfaceLayout(const ObjCInterfaceDecl *D) {
|
|||
// Allocate and assign into ASTRecordLayouts here. The "Entry" reference can
|
||||
// be invalidated (dangle) if the ASTRecordLayouts hashtable is inserted into.
|
||||
ASTRecordLayout *NewEntry = NULL;
|
||||
unsigned FieldCount = D->ivar_size();
|
||||
unsigned FieldCount =
|
||||
D->ivar_size() + std::distance(D->prop_begin(), D->prop_end());
|
||||
if (ObjCInterfaceDecl *SD = D->getSuperClass()) {
|
||||
FieldCount++;
|
||||
const ASTRecordLayout &SL = getASTObjCInterfaceLayout(SD);
|
||||
|
|
Загрузка…
Ссылка в новой задаче