]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2738] Missing buffer initialisation in parsestate().
authorMartin Burnicki <burnicki@ntp.org>
Tue, 27 Jan 2015 15:33:33 +0000 (16:33 +0100)
committerMartin Burnicki <burnicki@ntp.org>
Tue, 27 Jan 2015 15:33:33 +0000 (16:33 +0100)
[Bug 2739] Parse driver with PPS enabled occasionaly evaluates PPS timestamp with wrong sign.
Removed some German umlauts.

bk: 54c7afcdGXIi01IKhxMatZmds2WnUQ

ChangeLog
ntpd/refclock_parse.c

index 55c2fcbe031f96a35d4f4683f51081e159fc6d0b..46e29674b3288636d8fd56f79e5f2c69ad41dba8 100644 (file)
--- 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 <stenn@ntp.org>
 
index f76c05ff1db3c097ec4104ec3fce592573d71410..632f52d919992879a4577dab6b2d02c0fa744330 100644 (file)
@@ -16,7 +16,7 @@
  *   SunOS 4.x and SunOS5.x.
  *
  * Copyright (c) 1995-2009 by Frank Kardel <kardel <AT> 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
                                {