pgsql: When using C-string lookup keys in a dynahash.c hash table, use

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: When using C-string lookup keys in a dynahash.c hash table, use
Date: 2005-06-18 20:51:44
Message-ID: 20050618205144.CE1D65282C@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
When using C-string lookup keys in a dynahash.c hash table, use strncpy()
not memcpy() to copy the offered key into the hash table during HASH_ENTER.
This avoids possible core dump if the passed key is located very near the
end of memory. Per report from Stefan Kaltenbrunner.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
pgsql/src/backend/utils/hash:
dynahash.c (r1.58 -> r1.58.4.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/hash/dynahash.c.diff?r1=1.58&r2=1.58.4.1)
pgsql/src/include/utils:
hsearch.h (r1.34 -> r1.34.4.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/hsearch.h.diff?r1=1.34&r2=1.34.4.1)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2005-06-18 20:52:00 pgsql: When using C-string lookup keys in a dynahash.c hash table, use
Previous Message Tom Lane 2005-06-18 20:51:31 pgsql: When using C-string lookup keys in a dynahash.c hash table, use