Project

General

Profile

Actions

Bug #2301

closed

InMemoryStorage incorrectly iterates over entries

Added by Alex Afanasyev about 10 years ago. Updated about 10 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 #1

Updated by Davide Pesavento about 10 years ago

Could this be the cause of #2149?

Actions #2

Updated by Alex Afanasyev about 10 years ago

Looks like it.

Actions #3

Updated by Alex Afanasyev about 10 years ago

  • Related to Bug #2149: Heap-use-after-free in InMemoryStorage added
Actions #4

Updated by Alex Afanasyev about 10 years ago

  • Status changed from In Progress to New
  • Assignee changed from Alex Afanasyev to Jiewen Tan
  • % Done changed from 50 to 0
Actions #5

Updated by Alex Afanasyev about 10 years ago

  • Status changed from New to Code review
  • Assignee changed from Jiewen Tan to Alex Afanasyev
  • % Done changed from 0 to 100
Actions #6

Updated by Alex Afanasyev about 10 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF