瀏覽代碼

* fixed endless loop/memory corruption in filter calculation for mariadb driver

master
bergmann 7 年之前
父節點
當前提交
15c3cd8482
共有 1 個檔案被更改,包括 5 行新增2 行删除
  1. +5
    -2
      include/cpphibernate/driver/mariadb/schema/filter.inl

+ 5
- 2
include/cpphibernate/driver/mariadb/schema/filter.inl 查看文件

@@ -95,15 +95,18 @@ beg_namespace_cpphibernate_driver_mariadb
auto it = tables.begin();
while (it != tables.end())
{
bool removed = false;
for (auto& field : (*it)->fields)
{
if (fields.count(field.get()))
{
it = tables.erase(it);
continue;
removed = true;
break;
}
}
++it;
if (!removed)
++it;
}
}



Loading…
取消
儲存