Merge from vendor/ntp/dist: r182856:

Apply updated patch from bin/92839 to avoid two possible buffer overflows.

PR:		bin/92839
Submitted by:	Helge Oldach <freebsdntpd@oldach.net>
This commit is contained in:
Ollivier Robert 2008-09-07 22:15:41 +00:00
commit f8b329f0ed
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=182857

View File

@ -229,7 +229,7 @@ convert_rawdcf(
unsigned char *c = dcfprm->zerobits;
int i;
parseprintf(DD_RAWDCF,("parse: convert_rawdcf: \"%s\"\n", buffer));
parseprintf(DD_RAWDCF,("parse: convert_rawdcf: \"%.*s\"\n", size, buffer));
if (size < 57)
{
@ -320,7 +320,7 @@ convert_rawdcf(
* bad format - not for us
*/
#ifndef PARSEKERNEL
msyslog(LOG_ERR, "parse: convert_rawdcf: parity check FAILED for \"%s\"\n", buffer);
msyslog(LOG_ERR, "parse: convert_rawdcf: parity check FAILED for \"%.*s\"\n", size, buffer);
#endif
return CVT_FAIL|CVT_BADFMT;
}