ntcore icon indicating copy to clipboard operation
ntcore copied to clipboard

Potential issues when deleting entries

Open virtuald opened this issue 6 years ago • 1 comments

I'm not really expecting this to be fixed, but putting it here so it can be thought about.

If an uninformed user sets/deletes the same key over and over again, in Storage m_idmap will eventually become very large because ids are never reused. Additionally, if m_idmap gets over 65535 entries, then I think all sorts of bad things happen.

I wonder if there's any harm in reusing an ID after a key gets deleted? Right now the id is used to track whether something is assigned, but another variable could be used for that.

Specifically excluded is the case of a user creating lots of random keys and deleting them -- while it would definitely create problems, this usage seems fairly unreasonable.

virtuald avatar Oct 02 '17 12:10 virtuald