Commit 5ad4faf1 authored by Bruce Momjian's avatar Bruce Momjian

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

adding a missing sprintf().

Neil Conway
parent 3c104bc4
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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 * NOTES
* Outside modules can create a lock table and acquire/release * Outside modules can create a lock table and acquire/release
...@@ -256,6 +256,7 @@ LockMethodTableInit(char *tabName, ...@@ -256,6 +256,7 @@ LockMethodTableInit(char *tabName,
shmemName = (char *) palloc(strlen(tabName) + 32); shmemName = (char *) palloc(strlen(tabName) + 32);
/* each lock table has a non-shared, permanent header */ /* each lock table has a non-shared, permanent header */
sprintf(shmemName, "%s (lock method table)", tabName);
lockMethodTable = (LOCKMETHODTABLE *) lockMethodTable = (LOCKMETHODTABLE *)
ShmemInitStruct(shmemName, sizeof(LOCKMETHODTABLE), &found); ShmemInitStruct(shmemName, sizeof(LOCKMETHODTABLE), &found);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment