New commits:
commit 501bbbf58ea2179a7316156c2d82fa3fc2159411
Author: D. Hugh Redelmeier <[email protected]>
Date:   Thu Aug 24 12:42:28 2017 -0400

    pervasive: tame remaining calls to strncpy()
    
    - strncpy is rarely the right thing to do
    
    - for pure NUL-padding, strncpy is fine.  But that is rarely used in C
      and when it is used, code is often buggy
    
    - for pure NUL-termination, jam_str is best.
    
    - for safety, we NUL-terminate everything that is NUL-padded.  The
      only problem is that the longest representable strings are one
      character shorter.
    
    - too few datastructures document whether NUL-padding or
      NUL-termination is required so we do both.  For example,
      if I remember correctly, BSD requires network interface
      names to be NUL-padded and Linux requires NUL-termination.

_______________________________________________
Swan-commit mailing list
[email protected]
https://lists.libreswan.org/mailman/listinfo/swan-commit

Reply via email to