]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl_ckch: Fix build error about a possible uninitialized value
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 3 Jun 2022 14:37:31 +0000 (16:37 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 3 Jun 2022 14:41:11 +0000 (16:41 +0200)
A build error is reported about the path variable in the switch statement on
the commit type, in cli_io_handler_commit_cafile_crlfile() function. The
enum contains only 2 values, but a default clause has been added to return an
error to make GCC happy.

This patch must be backported as far as 2.5.

src/ssl_ckch.c

index ab8ceaadd5deb3218ce6329ce446eafcdf5200e2..e882c1a750d0df8dbd505476a1f6b24df31046ac 100644 (file)
@@ -2709,6 +2709,8 @@ static int cli_io_handler_commit_cafile_crlfile(struct appctx *appctx)
                case CAFILE_CRL:
                        path = crlfile_transaction.path;
                        break;
+               default:
+                       goto error;
        }
 
        while (1) {