Which of sprintf/snprintf is more secure?
I wish to know which of these two options is the more secure one to use: sprintf(buff, “%.*s”, MAXLEN, name) snprintf(buff, MAXLEN, “%s”, name) My understanding is that both are same. Please suggest.
I wish to know which of these two options is the more secure one to use: sprintf(buff, “%.*s”, MAXLEN, name) snprintf(buff, MAXLEN, “%s”, name) My understanding is that both are same. Please suggest.