aboutsummaryrefslogtreecommitdiff
path: root/src/backend/libpq/be-fsstubs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/libpq/be-fsstubs.c')
-rw-r--r--src/backend/libpq/be-fsstubs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/libpq/be-fsstubs.c b/src/backend/libpq/be-fsstubs.c
index 19a52757370..24c3199c1a5 100644
--- a/src/backend/libpq/be-fsstubs.c
+++ b/src/backend/libpq/be-fsstubs.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.15 1997/09/08 21:43:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.16 1997/10/25 01:09:16 momjian Exp $
*
* NOTES
* This should be moved to a more appropriate place. It is here
@@ -269,7 +269,7 @@ lo_import(text *filename)
/*
* open the file to be read in
*/
- strNcpy(fnamebuf, VARDATA(filename), VARSIZE(filename) - VARHDRSZ);
+ StrNCpy(fnamebuf, VARDATA(filename), VARSIZE(filename) - VARHDRSZ + 1);
fd = open(fnamebuf, O_RDONLY, 0666);
if (fd < 0)
{ /* error */
@@ -343,7 +343,7 @@ lo_export(Oid lobjId, text *filename)
* open the file to be written to
*/
oumask = umask((mode_t) 0);
- strNcpy(fnamebuf, VARDATA(filename), VARSIZE(filename) - VARHDRSZ);
+ StrNCpy(fnamebuf, VARDATA(filename), VARSIZE(filename) - VARHDRSZ + 1);
fd = open(fnamebuf, O_CREAT | O_WRONLY, 0666);
umask(oumask);
if (fd < 0)