uninitialized var in encnames.c

ma lz <ma100@hotmail.com>

From: ma lz <ma100@hotmail.com>
To: "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2026-01-15T08:00:50Z
Lists: pgsql-bugs
int
pg_char_to_encoding(const char *name)
{

    char        buff[NAMEDATALEN], // ------------------ UNINITIALIZED


    key = clean_encoding_name(name, buff);
}


static char *
clean_encoding_name(const char *key, char *newkey)
{
      const char *p;
      char     *np;

      for (p = key, np = newkey; *p != '\0'; p++)
      {
            if (isalnum((unsigned char) *p))
            {
                  if (*p >= 'A' && *p <= 'Z')
                        *np++ = *p + 'a' - 'A';
                  else
                        *np++ = *p;
            }
      }
      *np = '\0';
      return newkey;
}