Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitcc7cd87

Browse files
author
Michael Meskes
committed
Fixed segfault in adjust_informix due to missing varchar type.
1 parent89b5cbe commitcc7cd87

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,6 +1882,15 @@ Mon Dec 6 21:27:34 CET 2004
18821882

18831883
- Fixed bug in parsing of typedef'ed array sizes.
18841884
- Synced parser.
1885+
1886+
Thu Dec 23 09:26:08 CET 2004
1887+
1888+
- Added PGTYPEStimestamp_add_interval written by Dave Cramer.
1889+
- Fixed parsing of defines to make sure they used more than once.
1890+
1891+
Mon Jan 10 13:55:32 CET 2005
1892+
1893+
- Fixed segfault in adjust_informix due to missing varchar type.
18851894
- Set ecpg version to 3.2.0.
18861895
- Set compat library version to 1.2.
18871896
- Set ecpg library version to 4.2.

‎src/interfaces/ecpg/preproc/preproc.y

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.302 2004/12/06 20:35:35 meskes Exp $*/
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.303 2005/01/10 12:58:30 meskes Exp $*/
22

33
/* Copyright comment*/
44
%{
@@ -231,12 +231,12 @@ adjust_informix(struct arguments *list)
231231
original_var = ptr->variable->name;
232232
sprintf(temp,"%d))", ecpg_informix_var);
233233

234-
if ((ptr->variable->type->type != ECPGt_char && ptr->variable->type->type != ECPGt_unsigned_char) &&atoi(ptr->variable->type->size) >1)
234+
if ((ptr->variable->type->type !=ECPGt_varchar && ptr->variable->type->type !=ECPGt_char && ptr->variable->type->type != ECPGt_unsigned_char) &&atoi(ptr->variable->type->size) >1)
235235
{
236236
ptr->variable =new_variable(cat_str(4,make_str("("),mm_strdup(ECPGtype_name(ptr->variable->type->u.element->type)),make_str(" *)(ECPG_informix_get_var("),mm_strdup(temp)),ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type,make_str("1")), ptr->variable->type->size),0);
237237
sprintf(temp,"%d, (", ecpg_informix_var++);
238238
}
239-
elseif ((ptr->variable->type->type == ECPGt_char || ptr->variable->type->type == ECPGt_unsigned_char) &&atoi(ptr->variable->type->size) >1)
239+
elseif ((ptr->variable->type->type ==ECPGt_varchar || ptr->variable->type->type ==ECPGt_char || ptr->variable->type->type == ECPGt_unsigned_char) &&atoi(ptr->variable->type->size) >1)
240240
{
241241
ptr->variable =new_variable(cat_str(4,make_str("("),mm_strdup(ECPGtype_name(ptr->variable->type->type)),make_str(" *)(ECPG_informix_get_var("),mm_strdup(temp)),ECPGmake_simple_type(ptr->variable->type->type, ptr->variable->type->size),0);
242242
sprintf(temp,"%d, (", ecpg_informix_var++);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp