Skip to content
  • cypherpunks's avatar
    Fix buffer over-reads in the directory tests · 3d0d2a51
    cypherpunks authored and Nick Mathewson's avatar Nick Mathewson committed
    The tests pass empty digest strings to the dir_server_new function which
    copies it into a directory server structure. The copy operation expects
    the digest strings to be DIGEST_LEN characters long.
    
    Because the length of the empty digest strings are lower than
    DIGEST_LEN, the copy operation reads outside the digest strings which
    leads to buffer over-reads.
    
    The issue is resolved by using character arrays with a size of
    DIGEST_LEN.
    
    Patch on 4ff08bb5.
    3d0d2a51