Versions Compared

Key

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

...

Code Block
bgColor#ccccff
struct {
    char c;
    float f;
} myData;

if(fscanf(fd, "%c %f\n", &myData.c, &myData.f) != 2) {
    /* Handle error */
}

Risk Assessment

TODOReading binary data that has a different format than expected may result in unintended program behavior.

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

...