Skip to content

Conversation

@michaelortmann
Copy link
Member

Found by: michaelortmann
Patch by: michaelortmann
Fixes:

One-line summary:
Fix client_msg_plain_len initialization

Additional description (if needed):
Better safe than sorry

Test cases demonstrating functionality (if applicable):
Fixes following compiler warning under Alpine Linux v3.20.5:

gcc -fPIC -std=gnu99 -g -O2 -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod  -DHAVE_CONFIG_H -I/usr/include  -DMAKING_MODS -c .././server.mod/server.c && mv -f server.o ../
In file included from .././server.mod/server.c:27:
.././server.mod/sasl.c: In function 'gotauthenticate':
../../../src/mod/module.h:502:20: warning: 'client_msg_plain_len' may be used uninitialized [-Wmaybe-uninitialized]
  502 | # define b64_ntop ((int (*) (uint8_t const *, size_t, char *, size_t))global[305])
.././server.mod/sasl.c:608:7: note: in expansion of macro 'b64_ntop'
  608 |   if (b64_ntop((unsigned char *) client_msg_plain, client_msg_plain_len, client_msg_b64, sizeof client_msg_b64) == -1) {
      |       ^~~~~~~~
In file included from .././server.mod/server.c:140:
.././server.mod/sasl.c:537:7: note: 'client_msg_plain_len' was declared here
  537 |   int client_msg_plain_len;
      |       ^~~~~~~~~~~~~~~~~~~~

@vanosg vanosg added this to the v1.10.2 milestone Nov 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants