Index: src/bin/pg_dump/pg_backup_archiver.c =================================================================== RCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v retrieving revision 1.43 diff -c -r1.43 pg_backup_archiver.c *** src/bin/pg_dump/pg_backup_archiver.c 24 Apr 2002 02:21:04 -0000 1.43 --- src/bin/pg_dump/pg_backup_archiver.c 24 Apr 2002 14:01:15 -0000 *************** *** 1249,1266 **** int remaining = AH->lo_buf_size - AH->lo_buf_used; int slack = nmemb * size - remaining; ! memcpy(AH->lo_buf + AH->lo_buf_used, ptr, remaining); res = lo_write(AH->connection, AH->loFd, AH->lo_buf, AH->lo_buf_size); ahlog(AH, 5, "wrote %d bytes of large object data (result = %d)\n", AH->lo_buf_size, res); if (res != AH->lo_buf_size) die_horribly(AH, modulename, "could not write to large object (result: %d, expected: %d)\n", res, AH->lo_buf_size); ! memcpy(AH->lo_buf, ptr + remaining, slack); AH->lo_buf_used = slack; } else { /* LO Buffer is still large enough, buffer it */ ! memcpy(AH->lo_buf + AH->lo_buf_used, ptr, size * nmemb); AH->lo_buf_used += size * nmemb; } --- 1249,1266 ---- int remaining = AH->lo_buf_size - AH->lo_buf_used; int slack = nmemb * size - remaining; ! memcpy((char *)AH->lo_buf + AH->lo_buf_used, ptr, remaining); res = lo_write(AH->connection, AH->loFd, AH->lo_buf, AH->lo_buf_size); ahlog(AH, 5, "wrote %d bytes of large object data (result = %d)\n", AH->lo_buf_size, res); if (res != AH->lo_buf_size) die_horribly(AH, modulename, "could not write to large object (result: %d, expected: %d)\n", res, AH->lo_buf_size); ! memcpy(AH->lo_buf, (char *)ptr + remaining, slack); AH->lo_buf_used = slack; } else { /* LO Buffer is still large enough, buffer it */ ! memcpy((char *)AH->lo_buf + AH->lo_buf_used, ptr, size * nmemb); AH->lo_buf_used += size * nmemb; }