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
ac479502
Commit
ac479502
authored
Nov 26, 2002
by
Tatsuo Ishii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Guard against 0 length string encoding conversion case.
parent
9645fa8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/backend/utils/mb/mbutils.c
src/backend/utils/mb/mbutils.c
+7
-1
No files found.
src/backend/utils/mb/mbutils.c
View file @
ac479502
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* (currently mule internal code (mic) is used)
* (currently mule internal code (mic) is used)
* Tatsuo Ishii
* Tatsuo Ishii
*
*
* $Header: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v 1.3
6 2002/11/02 18:41:22 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v 1.3
7 2002/11/26 02:22:29 ishii
Exp $
*/
*/
#include "postgres.h"
#include "postgres.h"
...
@@ -165,6 +165,9 @@ pg_do_encoding_conversion(unsigned char *src, int len,
...
@@ -165,6 +165,9 @@ pg_do_encoding_conversion(unsigned char *src, int len,
if
(
src_encoding
==
PG_SQL_ASCII
||
dest_encoding
==
PG_SQL_ASCII
)
if
(
src_encoding
==
PG_SQL_ASCII
||
dest_encoding
==
PG_SQL_ASCII
)
return
src
;
return
src
;
if
(
len
<=
0
)
return
src
;
proc
=
FindDefaultConversionProc
(
src_encoding
,
dest_encoding
);
proc
=
FindDefaultConversionProc
(
src_encoding
,
dest_encoding
);
if
(
!
OidIsValid
(
proc
))
if
(
!
OidIsValid
(
proc
))
{
{
...
@@ -320,6 +323,9 @@ perform_default_encoding_conversion(unsigned char *src, int len, bool is_client_
...
@@ -320,6 +323,9 @@ perform_default_encoding_conversion(unsigned char *src, int len, bool is_client_
dest_encoding
;
dest_encoding
;
FmgrInfo
*
flinfo
;
FmgrInfo
*
flinfo
;
if
(
len
<=
0
)
return
src
;
if
(
is_client_to_server
)
if
(
is_client_to_server
)
{
{
src_encoding
=
ClientEncoding
->
encoding
;
src_encoding
=
ClientEncoding
->
encoding
;
...
...
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