[Git][NTPsec/ntpsec][ntpc] pylib: seems to fix unreported clang segfault issue

James Browning gitlab at mg.gitlab.com
Mon Sep 7 11:23:14 UTC 2020



James Browning pushed to branch ntpc at NTPsec / ntpsec


Commits:
c5d154e3 by JamesB192 at 2020-09-07T04:22:42-07:00
pylib: seems to fix unreported clang segfault issue


- - - - -


1 changed file:

- pylib/ntpc.py


Changes:

=====================================
pylib/ntpc.py
=====================================
@@ -55,7 +55,6 @@ TYPE_CLOCK = ctypes.c_int.in_dll(_ntpc, 'CLOCK_TYPE')
 def checkname(name):
     "Check if name is a valid algorithm name"
     _ntpc.do_checkname.restype = ctypes.c_int
-    print(repr(name))
     mid_bytes = ntp.poly.polybytes(name)
     _ntpc.do_checkname.argtypes = [ctypes.c_char_p]
     return _ntpc.do_checkname(mid_bytes)
@@ -63,10 +62,9 @@ def checkname(name):
 
 def mac(data, key, name):
     "Compute HMAC or CMAC from data, key, and algorithm name"
-    print('baz')
     resultlen, result = ctypes.c_size_t(), (ctypes.c_char * 64)()
     result.value = b'\0' * 64
-    _ntpc.do_mac.restype = ctypes.c_char_p
+    _ntpc.do_mac.restype = None
     _ntpc.do_mac(ntp.poly.polybytes(name),
                  ntp.poly.polybytes(data), len(data),
                  ntp.poly.polybytes(key), len(key),



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/c5d154e38696f98eaa5c93bca58882aac4a8ac44

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/c5d154e38696f98eaa5c93bca58882aac4a8ac44
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20200907/481716ba/attachment-0001.htm>


More information about the vc mailing list