[exim-dev] [Bug 3106] New: Logic error in auth-spa.c

Inizio della pagina
Delete this message
Reply to this message
Autore: Exim Bugzilla
Data:  
To: exim-dev
Oggetto: [exim-dev] [Bug 3106] New: Logic error in auth-spa.c
https://bugs.exim.org/show_bug.cgi?id=3106

            Bug ID: 3106
           Summary: Logic error in auth-spa.c
           Product: Exim
           Version: 4.97
          Hardware: All
                OS: All
            Status: NEW
          Severity: bug
          Priority: medium
         Component: SMTP Authentication
          Assignee: jgh146exb@???
          Reporter: exim@???
                CC: exim-dev@???

Created attachment 1484
  --> https://bugs.exim.org/attachment.cgi?id=1484&action=edit
More ()s in spa_bytes_add

The combination of f3d71ba5d3dc67ec6f9021e1da0d106ccfef080b /
0519dcfb5f149154a416b54865fd8026abb57791 (Auths: use uschar more in spa
authenticator) and
 936e342d560e218c2aee5cb2295be925c27c2106 /
e17b8b0f19b25a223b0cc41933b881c3a1073e61 (which fix bug #3000) leave a test in
spa_bytes_add() without sufficients ()s:

# gcc -Wall -Wno-parentheses -Wno-dangling-else -Wno-unused-function
-Wno-unused-result -Wno-address -Wno-format -Wno-format-truncation
-Wno-format-extra-args -Wno-unused-but-set-variable -Wno-unused-variable
-Wno-maybe-uninitialized -Wno-misleading-indentation -Wno-sign-compare
-Wno-old-style-declaration -Wno-unused-parameter -Wno-empty-body
-Wno-missing-field-initializers -Wno-implicit-fallthrough -o /dev/null -c
auths/auth-spa.orig.c
auths/auth-spa.orig.c: In function ‘spa_build_auth_response’:
auths/auth-spa.orig.c:1531:65: warning: ‘?:’ using integer constants in boolean
context, the expression will always evaluate to ‘true’ [-Wint-in-bool-contex]
 1531 | spa_bytes_add(response, lmResponse, lmRespData, cf & 0x200 ? 24 : 0);
      |                                                                 ^
auths/auth-spa.orig.c:1219:23: note: in definition of macro ‘spa_bytes_add’
 1219 |    && ptr->bufIndex + count < sizeof(ptr->buffer)                  \
      |                       ^~~~~
auths/auth-spa.orig.c:1532:66: warning: ‘?:’ using integer constants in boolean
context, the expression will always evaluate to ‘true’ [-Wint-in-bool-contex]
 1532 | spa_bytes_add(response, ntResponse, ntRespData, cf & 0x8000 ? 24 : 0);
      |                                                                  ^
auths/auth-spa.orig.c:1219:23: note: in definition of macro ‘spa_bytes_add’
 1219 |    && ptr->bufIndex + count < sizeof(ptr->buffer)                  \
      |                       ^~~~~

Patch attached.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-dev-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/