CWE-462: Duplicate Key in Associative List (Alist)

ID CWE-462
Abstraction Variant
Structure Simple
Status Incomplete
Duplicate keys in associative lists can lead to non-unique keys being mistaken for an error.

A duplicate key entry -- if the alist is designed properly -- could be used as a constant time replace function. However, duplicate key entries could be inserted by mistake. Because of this ambiguity, duplicate key entries in an association list are not recommended and should not be allowed.

Modes of Introduction

Phase Note
Implementation

Applicable Platforms

Type Class Name Prevalence
Language C
Language C++
Language Java
Language C#

Relationships

View Weakness
# ID View Status # ID Name Abstraction Structure Status
CWE-1000 Research Concepts Draft CWE-694 Use of Multiple Resources with Duplicate Identifier Base Simple Incomplete
Loading...
Loading...