You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.2 KiB

  1. From 69760db11dfca4a8d8fbd34cec25c334f77add67 Mon Sep 17 00:00:00 2001
  2. From: Willy Tarreau <w@1wt.eu>
  3. Date: Wed, 17 Jun 2015 18:34:14 +0200
  4. Subject: [PATCH 18/18] BUG/MINOR: ssl: fix smp_fetch_ssl_fc_session_id
  5. Dmitry Sivachenko reported the following build warning using Clang
  6. which is a real bug :
  7. src/ssl_sock.c:4104:44: warning: address of 'smp->data.str.len' will always
  8. evaluate to 'true' [-Wpointer-bool-conversion]
  9. if (!smp->data.str.str || !&smp->data.str.len)
  10. The impact is very low however, it will return an empty session_id
  11. instead of no session id when none is found.
  12. The fix should be backported to 1.5.
  13. (cherry picked from commit 745d4127582a8c66e2e8ce35f746a78e867960af)
  14. ---
  15. src/ssl_sock.c | 2 +-
  16. 1 file changed, 1 insertion(+), 1 deletion(-)
  17. diff --git a/src/ssl_sock.c b/src/ssl_sock.c
  18. index 93aab8b..7d77d36 100644
  19. --- a/src/ssl_sock.c
  20. +++ b/src/ssl_sock.c
  21. @@ -3540,7 +3540,7 @@ smp_fetch_ssl_fc_session_id(struct proxy *px, struct session *l4, void *l7, unsi
  22. return 0;
  23. smp->data.str.str = (char *)SSL_SESSION_get_id(sess, (unsigned int *)&smp->data.str.len);
  24. - if (!smp->data.str.str || !&smp->data.str.len)
  25. + if (!smp->data.str.str || !smp->data.str.len)
  26. return 0;
  27. return 1;
  28. --
  29. 2.3.6