Re: psql and bytea

Поиск
Список
Период
Сортировка
Искать
От
Féliciano Matias
Тема
Re: psql and bytea
Дата
Msg-id
1055226052.6253.11.camel@one.myworld
Ответ на
Re: psql and bytea (Féliciano Matias)
Список
Дерево обсуждения
Re: psql and bytea Féliciano Matias <feliciano.matias@free.fr>
Re: psql and bytea Tom Lane <tgl@sss.pgh.pa.us>
Re: psql and bytea Féliciano Matias <feliciano.matias@free.fr>
Re: psql and bytea Féliciano Matias <feliciano.matias@free.fr>
Re: psql and bytea Féliciano Matias <feliciano.matias@free.fr>
Re: psql and bytea Dennis Gearon <gearond@cvc.net>
Re: psql and bytea "Wayne Armstrong" <wdarmst@bacchus.com.au>
Le ven 16/05/2003 à 06:56, Féliciano Matias a écrit :

> > All of this is used with postgresql 7.3.2 shipped with Red Hat Linux 9

> [...]

> I found the problem. It's bug in sprintf()
> ===============================================
> #include 
> #include 
> #include 
> #define SIZE (1024*70000)
> int main(void) {
>     char * s = malloc(SIZE) ;
>     char * d = malloc(SIZE) ;
>     memset(s, 'a', SIZE-1) ;
>     d[SIZE-1] = '\0' ;
>     sprintf(d,"%s",s) ;
>     printf("%zi\n", strlen(d)) ;
>     return 0 ;
> }
> ===============================================
> $ ./a.out
> 67108863    (2^26-1)

> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=90987

from

bugzilla@redhat.com


------- Additional Comments From drepper@redhat.com  2003-06-09 23:22 -------
The current glibc CVS code has been changed to not have this liimtation anymore.

-- 
Féliciano Matias 
В списке pgsql-general по дате отправления
От: Tom Lane
Дата:
От: Richard Huxton
Дата:
FAQ