...
Assuming your compiler implements the minimum requirements for signficant characters required by the standard, the following examples are non-compliant:
| Code Block |
|---|
|
extern int global_symbol_definition_lookup_table_a[100]; |
...
extern int global_symbol_definition_lookup_table_b[100]; |
...
{code |
:bgColor | =#FFcccc | }
The external indentifiers in this example are not unique because the first 31 characters are identical. |
...
{code |
:bgColor | =#FFcccc | }
extern int \U00010401\U00010401\U00010401\U00010401[100]; |
...
extern int \U00010401\U00010401\U00010401\U00010402[100]; |
...
{code |
:bgColor | =#FFcccc | }
In this example, both external identifiers consist of four universal characters, but only the first three characters are unique. In practice, this means that both identifiers are referring to the same integer array.
h2. |
...
...
In the compliant solution, the signficant characters in each identifier vary. |
...
extern int a_global_symbol_definition_lookup_table100;
extern int b_global_symbol_definition_lookup_table100;
| Code Block |
|---|
|
Again, assuming a minimally compliant implementation, the first three universal characters used in an identifier must be unique.
|
| Code Block |
|---|
|
extern int \U00010401\U00010401\U00010401\U00010401100;
extern int \U00010402\U00010401\U00010401\U00010401100;
Risk Assessment
Non-unique identifiers can lead to abnormal program termination and denial-of-service attacks.
...