libressl/portable

ssl_tlsext.c:1608:30: warning: 'client_preferred_group' may be used uninitialized in this function

Closed this issue · 5 comments

  CC       libssl_la-ssl_tlsext.lo
  CC       libssl_la-ssl_transcript.lo
ssl_tlsext.c: In function 'tlsext_keyshare_server_process':
ssl_tlsext.c:1608:30: warning: 'client_preferred_group' may be used uninitialized in this function [-Wmaybe-uninitialized]
 1608 |   if (!preferred_group_found || group != client_preferred_group)
      |       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC       libssl_la-ssl_txt.lo
  CC       libssl_la-ssl_versions.lo

thanks!

job commented

@botovq do you know what aspect exactly in gcc arrives at these false positives? how does the detection work and why does it mess up in situations like these?