Versions Compared

Key

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

...

This compliant solution ensures there is will be no overflow by only reading in sizeof(buf)-1 characters. It also properly checks to see if an error has occurred.

...