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

From tgl@svr1.postgresql.org (Tom Lane)
Subject pgsql: When using C-string lookup keys in a dynahash.c hash table, use
Date
Msg-id 20050618205200.0E5DB5280D@svr1.postgresql.org
Whole thread Raw
List 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:
----
REL7_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/hash:
        dynahash.c (r1.48 -> r1.48.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/hash/dynahash.c.diff?r1=1.48&r2=1.48.2.1)
    pgsql/src/include/utils:
        hsearch.h (r1.29 -> r1.29.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/hsearch.h.diff?r1=1.29&r2=1.29.2.1)

pgsql-committers by date:

Previous
From: tgl@svr1.postgresql.org (Tom Lane)
Date:
Subject: pgsql: When using C-string lookup keys in a dynahash.c hash table, use
Next
From: jwp@pgfoundry.org (James William Pye)
Date:
Subject: python - be: Check NULL tb, rather than tbstr.