
snprintf() and vsnprintf(), the maximum value should not be larger than the
destination variable’s size.
■
gets() and fgets() Read in a string of data from various file descriptors.
Both can possibly read in more data than the destination variable was allo-
cated to hold.The fgets() function requires a maximum limit to be speci-
fied; therefore, you must check that the fgets() limit is not larger than the
destination variable size.
■
getc(), fgetc(), getchar(), and read() Used in a loop have a potential
chance of reading in too much data if the loop does not properly stop
reading in data after the maximum destination variable size is reached.You
will need ...