Skip to content

Commit e11136e

Browse files
author
Michael Meskes
committed
Fixed segfault after error in parsing precision argument.
1 parent 8d108fb commit e11136e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,11 @@ Tue Sep 23 14:50:45 CEST 2003
16561656

16571657
- Changed struct definition handling so "struct foo {}" always gets
16581658
defined.
1659+
1660+
Fri Sep 26 17:14:07 CEST 2003
1661+
1662+
- Incorrect datatype with precision argument should not create a
1663+
segfault.
16591664
- Set ecpg version to 3.0.0
16601665
- Set ecpg library to 4.0.0
16611666
- Set pgtypes library to 1.0.0

src/interfaces/ecpg/preproc/preproc.y

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.260 2003/09/24 19:05:32 momjian Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.261 2003/09/26 15:16:29 meskes Exp $ */
22

33
/* Copyright comment */
44
%{
@@ -4785,7 +4785,11 @@ common_type: simple_type
47854785
$$.type_str = make_str("decimal");
47864786
}
47874787
else
4788+
{
47884789
mmerror(PARSE_ERROR, ET_ERROR, "Only numeric/decimal have precision/scale argument");
4790+
$$.type_enum = ECPGt_numeric;
4791+
$$.type_str = make_str("numeric");
4792+
}
47894793

47904794
$$.type_dimension = make_str("-1");
47914795
$$.type_index = make_str("-1");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy