Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/ssl_crtlist.c dead code suspected by coverity #2571

Closed
chipitsine opened this issue May 18, 2024 · 1 comment
Closed

src/ssl_crtlist.c dead code suspected by coverity #2571

chipitsine opened this issue May 18, 2024 · 1 comment
Labels
status: fixed This issue is a now-fixed bug. type: code-report This issue describes a code report (like valgrind or coverity)

Comments

@chipitsine
Copy link
Member

Tool Name and Version

coverity

Code Report

** CID 1545822:  Control flow issues  (DEADCODE)
/src/ssl_crtlist.c: 857 in dump_crtlist_conf()


________________________________________________________________________________________________________
*** CID 1545822:  Control flow issues  (DEADCODE)
/src/ssl_crtlist.c: 857 in dump_crtlist_conf()
851     #ifdef OPENSSL_NPN_NEGOTIATED
852             if (conf->npn_str) {
853                     int len = conf->npn_len;
854                     char *ptr = conf->npn_str;
855                     int comma = 0;
856     
>>>     CID 1545822:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "chunk_appendf(buf, " ");".
857                     if (space) chunk_appendf(buf, " ");
858                     chunk_appendf(buf, "npn ");
859                     while (len) {
860                             unsigned short size;
861     
862                             size = *ptr;

Additional Information

No response

Output of haproxy -vv

no
@chipitsine chipitsine added the type: code-report This issue describes a code report (like valgrind or coverity) label May 18, 2024
haproxy-mirror pushed a commit that referenced this issue May 21, 2024
This code was never used because space is never define before:

    if (space) chunk_appendf(buf, " ");

Should fix issue #2571.
@wlallemand wlallemand added the status: fixed This issue is a now-fixed bug. label May 21, 2024
@wlallemand
Copy link
Member

Thanks, fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: fixed This issue is a now-fixed bug. type: code-report This issue describes a code report (like valgrind or coverity)
Projects
None yet
Development

No branches or pull requests

2 participants