diff --git a/src/ngx_http_ssl_ja4_module.h b/src/ngx_http_ssl_ja4_module.h index 12f2c16..51ce2fc 100644 --- a/src/ngx_http_ssl_ja4_module.h +++ b/src/ngx_http_ssl_ja4_module.h @@ -354,10 +354,19 @@ ngx_ssl_ja4_detail_print(ngx_pool_t *pool, ngx_ssl_ja4_t *ja4) } /* ALPN Values */ - ngx_log_debug1(NGX_LOG_DEBUG_EVENT, - pool->log, 0, "ssl_ja4: ALPN Value: %s\n", - ja4->alpn_first_value); -} + // handle if null + if (ja4->alpn_first_value == NULL) + { + ngx_log_debug1(NGX_LOG_DEBUG_EVENT, + pool->log, 0, "ssl_ja4: ALPN Value: NULL\n"); + } + else + { + ngx_log_debug1(NGX_LOG_DEBUG_EVENT, + pool->log, 0, "ssl_ja4: ALPN Value: %s\n", + ja4->alpn_first_value); + } + #endif // FUNCTION PROTOTYPES