Skip to content
  • Vladimír Čunát's avatar
    666947db
    dnstap: avoid a false-positive warning · 666947db
    Vladimír Čunát authored
    ../modules/dnstap/dnstap.c: In function 'dnstap_config':
    ../modules/dnstap/dnstap.c:410:29: warning: 'strndup' specified bound 4096 exceeds source size 17 [-Wstringop-overread]
      410 |                 sock_path = strndup(DEFAULT_SOCK_PATH, PATH_MAX);
          |                             ^
    ../modules/dnstap/dnstap.c:423:37: warning: 'strndup' specified bound 4096 exceeds source size 17 [-Wstringop-overread]
      423 |                         sock_path = strndup(DEFAULT_SOCK_PATH, PATH_MAX);
          |                                     ^
    
    We don't need to restrict our built-in path defaults to PATH_MAX
    characters, as they just can't be that long and it's not an issue if we
    shoot over it anyway - opening such a file would only fail.
    666947db
    dnstap: avoid a false-positive warning
    Vladimír Čunát authored
    ../modules/dnstap/dnstap.c: In function 'dnstap_config':
    ../modules/dnstap/dnstap.c:410:29: warning: 'strndup' specified bound 4096 exceeds source size 17 [-Wstringop-overread]
      410 |                 sock_path = strndup(DEFAULT_SOCK_PATH, PATH_MAX);
          |                             ^
    ../modules/dnstap/dnstap.c:423:37: warning: 'strndup' specified bound 4096 exceeds source size 17 [-Wstringop-overread]
      423 |                         sock_path = strndup(DEFAULT_SOCK_PATH, PATH_MAX);
          |                                     ^
    
    We don't need to restrict our built-in path defaults to PATH_MAX
    characters, as they just can't be that long and it's not an issue if we
    shoot over it anyway - opening such a file would only fail.
Loading