trivial patch for pg_dump blob problem
| От | Oleg Drokin |
|---|---|
| Тема | trivial patch for pg_dump blob problem |
| Дата | |
| Msg-id | 20030208173217.GA2413@linuxhacker.ru обсуждение исходный текст |
| Ответы |
Re: trivial patch for pg_dump blob problem
|
| Список | pgsql-patches |
Hello!
In case when there some error have occured getting blob data,
instead of failing gracefully failing, it will probably segfault
or loop forever.
All of this will happen only on platforms where size_t is unsigned
(e.g. on Linux systems modulo Linux/sparc32).
Simple non-intrusive patch is below ;)
Bye,
Oleg
--- postgresql-7.3.2/src/bin/pg_dump/pg_dump.c.orig Sat Feb 8 20:23:54 2003
+++ postgresql-7.3.2/src/bin/pg_dump/pg_dump.c Sat Feb 8 20:25:13 2003
@@ -1355,7 +1355,7 @@
do
{
cnt = lo_read(g_conn, loFd, buf, loBufSize);
- if (cnt < 0)
+ if ((int)cnt < 0)
{
write_msg(NULL, "dumpBlobs(): error reading large object: %s",
PQerrorMessage(g_conn));
В списке pgsql-patches по дате отправления: