Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
ea9ec780
Commit
ea9ec780
authored
Jun 26, 2006
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some more coverity report patches send in by Joachim Wieland <joe@mcknight.de>.
parent
bc28f58b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
11 deletions
+17
-11
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+5
-0
src/interfaces/ecpg/compatlib/informix.c
src/interfaces/ecpg/compatlib/informix.c
+2
-1
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/ecpglib/execute.c
+10
-10
No files found.
src/interfaces/ecpg/ChangeLog
View file @
ea9ec780
...
@@ -2030,5 +2030,10 @@ we Jun 21 13:37:00 CEST 2006
...
@@ -2030,5 +2030,10 @@ we Jun 21 13:37:00 CEST 2006
Su Jun 25 11:27:46 CEST 2006
Su Jun 25 11:27:46 CEST 2006
- Moved some free() calls that coverity correctly complains about.
- Moved some free() calls that coverity correctly complains about.
Mo Jun 26 11:05:25 CEST 2006
- Added some more coverity report patches send in by Joachim Wieland
<joe@mcknight.de>.
- Set ecpg library version to 5.2.
- Set ecpg library version to 5.2.
- Set ecpg version to 4.2.1.
- Set ecpg version to 4.2.1.
src/interfaces/ecpg/compatlib/informix.c
View file @
ea9ec780
/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.4
5 2006/06/25 01:45:32 momjian
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.4
6 2006/06/26 09:20:09 meskes
Exp $ */
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
...
@@ -417,6 +417,7 @@ dectoint(decimal *np, int *ip)
...
@@ -417,6 +417,7 @@ dectoint(decimal *np, int *ip)
}
}
ret
=
PGTYPESnumeric_to_int
(
nres
,
ip
);
ret
=
PGTYPESnumeric_to_int
(
nres
,
ip
);
PGTYPESnumeric_free
(
nres
);
if
(
ret
==
PGTYPES_NUM_OVERFLOW
)
if
(
ret
==
PGTYPES_NUM_OVERFLOW
)
ret
=
ECPG_INFORMIX_NUM_OVERFLOW
;
ret
=
ECPG_INFORMIX_NUM_OVERFLOW
;
...
...
src/interfaces/ecpg/ecpglib/execute.c
View file @
ea9ec780
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.
49 2006/06/25 09:38:3
9 meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.
50 2006/06/26 09:20:0
9 meskes Exp $ */
/*
/*
* The aim is to get a simpler inteface to the database routines.
* The aim is to get a simpler inteface to the database routines.
...
@@ -875,16 +875,16 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
...
@@ -875,16 +875,16 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
case
ECPGt_numeric
:
case
ECPGt_numeric
:
{
{
char
*
str
=
NULL
;
char
*
str
=
NULL
;
int
slen
;
int
slen
;
numeric
*
nval
=
PGTYPESnumeric_new
();
numeric
*
nval
=
PGTYPESnumeric_new
();
if
(
!
nval
)
return
false
;
if
(
var
->
arrsize
>
1
)
if
(
var
->
arrsize
>
1
)
{
{
for
(
element
=
0
;
element
<
var
->
arrsize
;
element
++
,
nval
=
PGTYPESnumeric_new
())
for
(
element
=
0
;
element
<
var
->
arrsize
;
element
++
,
nval
=
PGTYPESnumeric_new
())
{
{
if
(
!
nval
)
return
false
;
if
(
var
->
type
==
ECPGt_numeric
)
if
(
var
->
type
==
ECPGt_numeric
)
PGTYPESnumeric_copy
((
numeric
*
)
((
var
+
var
->
offset
*
element
)
->
value
),
nval
);
PGTYPESnumeric_copy
((
numeric
*
)
((
var
+
var
->
offset
*
element
)
->
value
),
nval
);
else
else
...
@@ -892,10 +892,10 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
...
@@ -892,10 +892,10 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
str
=
PGTYPESnumeric_to_asc
(
nval
,
nval
->
dscale
);
str
=
PGTYPESnumeric_to_asc
(
nval
,
nval
->
dscale
);
slen
=
strlen
(
str
);
slen
=
strlen
(
str
);
PGTYPESnumeric_free
(
nval
);
if
(
!
(
mallocedval
=
ECPGrealloc
(
mallocedval
,
strlen
(
mallocedval
)
+
slen
+
sizeof
(
"array [] "
),
lineno
)))
if
(
!
(
mallocedval
=
ECPGrealloc
(
mallocedval
,
strlen
(
mallocedval
)
+
slen
+
sizeof
(
"array [] "
),
lineno
)))
{
{
PGTYPESnumeric_free
(
nval
);
ECPGfree
(
str
);
ECPGfree
(
str
);
return
false
;
return
false
;
}
}
...
@@ -906,24 +906,25 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
...
@@ -906,24 +906,25 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
strncpy
(
mallocedval
+
strlen
(
mallocedval
),
str
,
slen
+
1
);
strncpy
(
mallocedval
+
strlen
(
mallocedval
),
str
,
slen
+
1
);
strcpy
(
mallocedval
+
strlen
(
mallocedval
),
","
);
strcpy
(
mallocedval
+
strlen
(
mallocedval
),
","
);
ECPGfree
(
str
);
ECPGfree
(
str
);
PGTYPESnumeric_free
(
nval
);
}
}
strcpy
(
mallocedval
+
strlen
(
mallocedval
)
-
1
,
"]"
);
strcpy
(
mallocedval
+
strlen
(
mallocedval
)
-
1
,
"]"
);
}
}
else
else
{
{
if
(
!
nval
)
return
false
;
if
(
var
->
type
==
ECPGt_numeric
)
if
(
var
->
type
==
ECPGt_numeric
)
PGTYPESnumeric_copy
((
numeric
*
)
(
var
->
value
),
nval
);
PGTYPESnumeric_copy
((
numeric
*
)
(
var
->
value
),
nval
);
else
else
PGTYPESnumeric_from_decimal
((
decimal
*
)
(
var
->
value
),
nval
);
PGTYPESnumeric_from_decimal
((
decimal
*
)
(
var
->
value
),
nval
);
str
=
PGTYPESnumeric_to_asc
(
nval
,
nval
->
dscale
);
str
=
PGTYPESnumeric_to_asc
(
nval
,
nval
->
dscale
);
slen
=
strlen
(
str
);
slen
=
strlen
(
str
);
PGTYPESnumeric_free
(
nval
);
if
(
!
(
mallocedval
=
ECPGalloc
(
slen
+
1
,
lineno
)))
if
(
!
(
mallocedval
=
ECPGalloc
(
slen
+
1
,
lineno
)))
{
{
PGTYPESnumeric_free
(
nval
);
free
(
str
);
free
(
str
);
return
false
;
return
false
;
}
}
...
@@ -931,7 +932,6 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
...
@@ -931,7 +932,6 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
strncpy
(
mallocedval
,
str
,
slen
);
strncpy
(
mallocedval
,
str
,
slen
);
mallocedval
[
slen
]
=
'\0'
;
mallocedval
[
slen
]
=
'\0'
;
ECPGfree
(
str
);
ECPGfree
(
str
);
PGTYPESnumeric_free
(
nval
);
}
}
*
tobeinserted_p
=
mallocedval
;
*
tobeinserted_p
=
mallocedval
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment