uninitialized var in encnames.c

From: ma lz <ma100(at)hotmail(dot)com>
To: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: uninitialized var in encnames.c
Date: 2026-01-15 08:00:50
Message-ID: TY3PR01MB11513F0EC0379CB2530C4F6E1F28CA@TY3PR01MB11513.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
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;
}

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message ma lz 2026-01-15 08:06:00 回复: uninitialized var in encnames.c
Previous Message Pierre Forstmann 2026-01-15 07:32:43 Re: BUG #19369: Not documented that io_uring on kernel versions between 5.1 and below 5.6 does not work