Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 13553cb

Browse filesBrowse files
committed
Fix header's size of structs defines in ispell.
Backpatch is needed for contrib version.
1 parent 64def09 commit 13553cb
Copy full SHA for 13553cb

File tree

Expand file treeCollapse file tree

2 files changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-5
lines changed

‎src/backend/tsearch/spell.c

Copy file name to clipboardExpand all lines: src/backend/tsearch/spell.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.4 2007/09/10 20:27:12 teodor Exp $
10+
* $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.5 2007/09/11 12:57:05 teodor Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -896,7 +896,7 @@ mkSPNode(IspellDict * Conf, int low, int high, int level)
896896
if (!nchar)
897897
return NULL;
898898

899-
rs = (SPNode *) palloc0(SPNHRDSZ + nchar * sizeof(SPNodeData));
899+
rs = (SPNode *) palloc0(SPNHDRSZ + nchar * sizeof(SPNodeData));
900900
rs->length = nchar;
901901
data = rs->data;
902902

‎src/include/tsearch/dicts/spell.h

Copy file name to clipboardExpand all lines: src/include/tsearch/dicts/spell.h
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
88
*
9-
* $PostgreSQL: pgsql/src/include/tsearch/dicts/spell.h,v 1.2 2007/08/25 00:03:59 tgl Exp $
9+
* $PostgreSQL: pgsql/src/include/tsearch/dicts/spell.h,v 1.3 2007/09/11 12:57:05 teodor Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -52,7 +52,7 @@ typedef struct SPNode
5252
SPNodeData data[1];
5353
} SPNode;
5454

55-
#define SPNHRDSZ (sizeof(uint32))
55+
#define SPNHDRSZ (offsetof(SPNode,data))
5656

5757

5858
typedef struct spell_struct
@@ -123,7 +123,7 @@ typedef struct AffixNode
123123
AffixNodeData data[1];
124124
} AffixNode;
125125

126-
#define ANHRDSZ (sizeof(uint32))
126+
#define ANHRDSZ (offsetof(AffixNode, data))
127127

128128
typedef struct
129129
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.