Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this noncompliant code example, the addresses of the POSIX functions getuid and geteuid are compared for equality to 0. Since the address of Because no function is address shall be null, the first subexpression will always evaluate to false (zero), and the second subexpression always to true (nonzero). Consequently, the entire expression will always evaluate to true, leading to a potential security vulnerability.

...