Обсуждение: dbmirror had sprintf string too short

Поиск
Список
Период
Сортировка

dbmirror had sprintf string too short

От
Bruce Momjian
Дата:
I have just applied a patch to 7.3 and current CVS to properly allocate
an sprintf string in dbmirror:
       fullyqualtblname = SPI_palloc(strlen(tblname) +                          strlen(schemaname) + 6);
sprintf(fullyqualtblname,"\"%s\".\"%s\"",          schemaname,tblname);
 

Old code had 4 instead of 6.  Tatsuo found this bug.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073