This patch removes a use of uninitialized memory in lmgr/lock.c, by

adding a missing sprintf().

Neil Conway
This commit is contained in:
Bruce Momjian 2002-09-26 05:18:30 +00:00
parent 3c104bc4ed
commit 5ad4faf13a
1 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.115 2002/09/04 20:31:25 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.116 2002/09/26 05:18:30 momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
@ -256,6 +256,7 @@ LockMethodTableInit(char *tabName,
shmemName = (char *) palloc(strlen(tabName) + 32);
/* each lock table has a non-shared, permanent header */
sprintf(shmemName, "%s (lock method table)", tabName);
lockMethodTable = (LOCKMETHODTABLE *)
ShmemInitStruct(shmemName, sizeof(LOCKMETHODTABLE), &found);