1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

While investigating a user's complaint, I have found some memory

destructions in 6.4 source using purify.

(1) parser/gram.y:fmtId()

It writes n+3 bytes into n+1 byte-long memory area if mixed case or
non-ascii identifiers given.

(2) catalog/index.c:

ATTRIBUTE_TUPLE_SIZE bytes are allocated but
sizeof(FormData_pg_attribute) bytes are written. Note that
ATTRIBUTE_TUPLE_SIZE is smaller than
sizeof(FormData_pg_attribute). (for example, on solaris 2.6,

Tatsuo Ishii
This commit is contained in:
Bruce Momjian
1998-12-13 04:37:51 +00:00
parent 589f5aa241
commit 31d825ba07
2 changed files with 5 additions and 5 deletions

View File

@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.38 1998/12/04 15:34:29 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.39 1998/12/13 04:37:51 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -5224,7 +5224,7 @@ fmtId(char *rawid)
if (! (islower(*cp) || isdigit(*cp) || (*cp == '_'))) break;
if (*cp != '\0') {
cp = palloc(strlen(rawid)+1);
cp = palloc(strlen(rawid)+3);
strcpy(cp,"\"");
strcat(cp,rawid);
strcat(cp,"\"");