From: Martin Burnicki Date: Tue, 27 Jan 2015 15:33:33 +0000 (+0100) Subject: [Bug 2738] Missing buffer initialisation in parsestate(). X-Git-Tag: NTP_4_2_8P1_RC2~3^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dadf43d0436af22df1d5d2bbad4a1191dc4ff4d3;p=thirdparty%2Fntp.git [Bug 2738] Missing buffer initialisation in parsestate(). [Bug 2739] Parse driver with PPS enabled occasionaly evaluates PPS timestamp with wrong sign. Removed some German umlauts. bk: 54c7afcdGXIi01IKhxMatZmds2WnUQ --- diff --git a/ChangeLog b/ChangeLog index 55c2fcbe0..46e29674b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +* [Bug 2738] Missing buffer initialisation in parsestate(). +* [Bug 2739] Parse driver with PPS enabled occasionaly evaluates + PPS timestamp with wrong sign. + Removed some German umlauts. --- (4.2.8p1-RC1) 2015/01/24 Released by Harlan Stenn diff --git a/ntpd/refclock_parse.c b/ntpd/refclock_parse.c index f76c05ff1..632f52d91 100644 --- a/ntpd/refclock_parse.c +++ b/ntpd/refclock_parse.c @@ -16,7 +16,7 @@ * SunOS 4.x and SunOS5.x. * * Copyright (c) 1995-2009 by Frank Kardel ntp.org> - * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany + * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -2533,6 +2533,7 @@ parsestate( int i; char *s, *t; + *buffer = '\0'; s = t = buffer; i = 0; @@ -4025,7 +4026,7 @@ parse_process( * implied on second offset */ off.l_uf = ~off.l_uf; /* map [0.5..1[ -> [-0.5..0[ */ - off.l_i = (off.l_uf & 0x8000000) ? -1 : 0; /* sign extend */ + off.l_i = (off.l_uf & 0x80000000) ? -1 : 0; /* sign extend */ } else {