Project

General

Profile

Actions

Bug #2301

closed

InMemoryStorage incorrectly iterates over entries

Added by Alex Afanasyev over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Utils
Target version:
Start date:
12/15/2014
Due date:
% Done:

100%

Estimated time:

Description

In a few places, the following is done in InMemoryStorage:

Cache::iterator it = m_cache.begin();
while (it != m_cache.end()) {
  freeEntry(it);
  it++;
}

freeEntry(it) actually removes entry from m_cache, so it is invalidated and it++ doesn't make sense anymore.


Related issues 1 (0 open1 closed)

Related to ndn-cxx - Bug #2149: Heap-use-after-free in InMemoryStorageClosedJiewen Tan

Actions
Actions

Also available in: Atom PDF