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
b9be04e6
Commit
b9be04e6
authored
Apr 19, 2001
by
Tatsuo Ishii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a crash gurard to pg_encoding_mblen in case of an invalid encoding
given.
parent
23436bd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/backend/utils/mb/wchar.c
src/backend/utils/mb/wchar.c
+2
-2
No files found.
src/backend/utils/mb/wchar.c
View file @
b9be04e6
/*
* conversion functions between pg_wchar and multi-byte streams.
* Tatsuo Ishii
* $Id: wchar.c,v 1.1
7 2001/03/22 04:00:05 momjian
Exp $
* $Id: wchar.c,v 1.1
8 2001/04/19 02:34:35 ishii
Exp $
*
* WIN1250 client encoding updated by Pavel Behal
*
...
...
@@ -502,5 +502,5 @@ pg_mic_mblen(const unsigned char *mbstr)
int
pg_encoding_mblen
(
int
encoding
,
const
unsigned
char
*
mbstr
)
{
return
((
*
pg_wchar_table
[
encoding
].
mblen
)
(
mbstr
));
return
(
(
encoding
>=
0
&&
encoding
<
sizeof
(
pg_wchar_table
)
/
sizeof
(
pg_wchar_tbl
))
?
((
*
pg_wchar_table
[
encoding
].
mblen
)
(
mbstr
))
:
((
*
pg_wchar_table
[
SQL_ASCII
].
mblen
)
(
mbstr
)
));
}
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