test/ssltest_old.c:344: error: NULL_DEREFERENCE
  pointer `server_proto` last assigned on line 333 could be null and is dereferenced by call to `memcmp()` at line 344, column 9.
Showing all 24 steps of the trace


test/ssltest_old.c:328:1: start of procedure verify_alpn()
326.   }
327.   
328. > static int verify_alpn(SSL *client, SSL *server)
329.   {
330.       const unsigned char *client_proto, *server_proto;

test/ssltest_old.c:331:5: 
329.   {
330.       const unsigned char *client_proto, *server_proto;
331. >     unsigned int client_proto_len = 0, server_proto_len = 0;
332.       SSL_get0_alpn_selected(client, &client_proto, &client_proto_len);
333.       SSL_get0_alpn_selected(server, &server_proto, &server_proto_len);

test/ssltest_old.c:332:5: 
330.       const unsigned char *client_proto, *server_proto;
331.       unsigned int client_proto_len = 0, server_proto_len = 0;
332. >     SSL_get0_alpn_selected(client, &client_proto, &client_proto_len);
333.       SSL_get0_alpn_selected(server, &server_proto, &server_proto_len);
334.   

ssl/ssl_lib.c:2960:1: start of procedure SSL_get0_alpn_selected()
  2958.    * respond with a negotiated protocol then |*len| will be zero.
  2959.    */
  2960. > void SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
  2961.                               unsigned int *len)
  2962.   {

ssl/ssl_lib.c:2963:5: 
  2961.                               unsigned int *len)
  2962.   {
  2963. >     *data = ssl->s3.alpn_selected;
  2964.       if (*data == NULL)
  2965.           *len = 0;

ssl/ssl_lib.c:2964:9: Taking false branch
  2962.   {
  2963.       *data = ssl->s3.alpn_selected;
  2964.       if (*data == NULL)
                  ^
  2965.           *len = 0;
  2966.       else

ssl/ssl_lib.c:2967:9: 
  2965.           *len = 0;
  2966.       else
  2967. >         *len = (unsigned int)ssl->s3.alpn_selected_len;
  2968.   }
  2969.   

ssl/ssl_lib.c:2964:5: 
  2962.   {
  2963.       *data = ssl->s3.alpn_selected;
  2964. >     if (*data == NULL)
  2965.           *len = 0;
  2966.       else

ssl/ssl_lib.c:2968:1: return from a call to SSL_get0_alpn_selected
  2966.       else
  2967.           *len = (unsigned int)ssl->s3.alpn_selected_len;
  2968. > }
  2969.   
  2970.   int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,

test/ssltest_old.c:333:5: 
331.       unsigned int client_proto_len = 0, server_proto_len = 0;
332.       SSL_get0_alpn_selected(client, &client_proto, &client_proto_len);
333. >     SSL_get0_alpn_selected(server, &server_proto, &server_proto_len);
334.   
335.       OPENSSL_free(alpn_selected);

ssl/ssl_lib.c:2960:1: start of procedure SSL_get0_alpn_selected()
  2958.    * respond with a negotiated protocol then |*len| will be zero.
  2959.    */
  2960. > void SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
  2961.                               unsigned int *len)
  2962.   {

ssl/ssl_lib.c:2963:5: 
  2961.                               unsigned int *len)
  2962.   {
  2963. >     *data = ssl->s3.alpn_selected;
  2964.       if (*data == NULL)
  2965.           *len = 0;

ssl/ssl_lib.c:2964:9: Taking true branch
  2962.   {
  2963.       *data = ssl->s3.alpn_selected;
  2964.       if (*data == NULL)
                  ^
  2965.           *len = 0;
  2966.       else

ssl/ssl_lib.c:2965:9: 
  2963.       *data = ssl->s3.alpn_selected;
  2964.       if (*data == NULL)
  2965. >         *len = 0;
  2966.       else
  2967.           *len = (unsigned int)ssl->s3.alpn_selected_len;

ssl/ssl_lib.c:2964:5: 
  2962.   {
  2963.       *data = ssl->s3.alpn_selected;
  2964. >     if (*data == NULL)
  2965.           *len = 0;
  2966.       else

ssl/ssl_lib.c:2968:1: return from a call to SSL_get0_alpn_selected
  2966.       else
  2967.           *len = (unsigned int)ssl->s3.alpn_selected_len;
  2968. > }
  2969.   
  2970.   int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,

test/ssltest_old.c:335:5: 
333.       SSL_get0_alpn_selected(server, &server_proto, &server_proto_len);
334.   
335. >     OPENSSL_free(alpn_selected);
336.       alpn_selected = NULL;
337.   

providers/fips/fipsprov.c:496:1: start of procedure CRYPTO_free()
  494.   }
  495.   
  496. > void CRYPTO_free(void *ptr, const char *file, int line)
  497.   {
  498.       c_CRYPTO_free(ptr, file, line);

providers/fips/fipsprov.c:498:5: Skipping __function_pointer__(): unresolved function pointer
  496.   void CRYPTO_free(void *ptr, const char *file, int line)
  497.   {
  498.       c_CRYPTO_free(ptr, file, line);
             ^
  499.   }
  500.   

providers/fips/fipsprov.c:499:1: return from a call to CRYPTO_free
  497.   {
  498.       c_CRYPTO_free(ptr, file, line);
  499. > }
  500.   
  501.   void CRYPTO_clear_free(void *ptr, size_t num, const char *file, int line)

test/ssltest_old.c:336:5: 
334.   
335.       OPENSSL_free(alpn_selected);
336. >     alpn_selected = NULL;
337.   
338.       if (client_proto_len != server_proto_len) {

test/ssltest_old.c:338:9: Taking false branch
336.       alpn_selected = NULL;
337.   
338.       if (client_proto_len != server_proto_len) {
               ^
339.           BIO_printf(bio_stdout, "ALPN selected protocols differ!\n");
340.           goto err;

test/ssltest_old.c:343:9: Taking true branch
341.       }
342.   
343.       if (client_proto != NULL &&
               ^
344.           memcmp(client_proto, server_proto, client_proto_len) != 0) {
345.           BIO_printf(bio_stdout, "ALPN selected protocols differ!\n");

test/ssltest_old.c:344:9: 
342.   
343.       if (client_proto != NULL &&
344. >         memcmp(client_proto, server_proto, client_proto_len) != 0) {
345.           BIO_printf(bio_stdout, "ALPN selected protocols differ!\n");
346.           goto err;
