Not everything in the re_array is the same size. This patch
first checks that they actually are the same size in the first
place.
Kurt
Index: src/backend/utils/adt/regexp.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/adt/regexp.c,v
retrieving revision 1.51
diff -u -r1.51 regexp.c
--- src/backend/utils/adt/regexp.c 19 Jan 2004 19:04:40 -0000 1.51
+++ src/backend/utils/adt/regexp.c 2 Feb 2004 22:20:18 -0000
@@ -119,7 +119,8 @@
*/
for (i = 0; i < num_res; i++)
{
- if (memcmp(re_array[i].cre_pat, text_re, text_re_len) == 0 &&
+ if (VARSIZE(re_array[i].cre_pat) == text_re_len &&
+ memcmp(re_array[i].cre_pat, text_re, text_re_len) == 0 &&
re_array[i].cre_flags == cflags)
{
/*
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly