Skip to content
OpenAdvisories

Weakness (CWE)

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

Variant Incomplete

Duplicate keys in associative lists can lead to non-unique keys being mistaken for an error.

How to prevent it (3 mitigations)
  1. Implementation

    Use a hash table instead of an alist.

  2. Implementation

    Use an alist which checks the uniqueness of hash keys with each entry before inserting the entry.

  3. Implementation

    Duplicate key entries in an association list are not recommended and should not be allowed.

Source: MITRE CWE-462

0 results · Clear filters · Feed

Nothing found.