1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

Some security, since we now have vsnprintf, I remade an old patch

with some extra ugly sprintfs fixed. More work in this area is
   needed still.

Göran Thyni
This commit is contained in:
Bruce Momjian
1999-01-01 04:48:49 +00:00
parent d8ae7ffb2f
commit f0fbd7b87e
5 changed files with 15 additions and 18 deletions

View File

@ -4,7 +4,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: psort.c,v 1.45 1998/12/14 08:11:14 scrappy Exp $
* $Id: psort.c,v 1.46 1999/01/01 04:48:49 momjian Exp $
*
* NOTES
* Sorts the first relation into the second relation.
@ -1019,7 +1019,8 @@ gettape()
tp = (struct tapelst *) palloc((unsigned) sizeof(struct tapelst));
sprintf(uniqueName, "%spg_psort.%d.%d", TEMPDIR, (int) MyProcPid, uniqueFileId);
snprintf(uniqueName, MAXPGPATH - 1, "%spg_psort.%d.%d",
TEMPDIR, (int) MyProcPid, uniqueFileId);
uniqueFileId++;
tapeinit = 1;