Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
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
Libraries
asn1c
Commits
29c41687
Commit
29c41687
authored
Oct 02, 2004
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UTF8String_length() API change
parent
00df16d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
libasn1compiler/asn1c_constraint.c
libasn1compiler/asn1c_constraint.c
+9
-6
No files found.
libasn1compiler/asn1c_constraint.c
View file @
29c41687
...
@@ -310,7 +310,6 @@ asn1c_emit_constraint_tables(arg_t *arg, int got_size) {
...
@@ -310,7 +310,6 @@ asn1c_emit_constraint_tables(arg_t *arg, int got_size) {
/*
/*
* UTF8String type is a special case in many respects.
* UTF8String type is a special case in many respects.
*/
*/
assert
(
range_stop
>
255
);
/* This one's unobvious */
if
(
got_size
)
{
if
(
got_size
)
{
/*
/*
* Size has been already determined.
* Size has been already determined.
...
@@ -337,9 +336,8 @@ asn1c_emit_constraint_tables(arg_t *arg, int got_size) {
...
@@ -337,9 +336,8 @@ asn1c_emit_constraint_tables(arg_t *arg, int got_size) {
ct
->
_compile_mark
);
ct
->
_compile_mark
);
INDENT
(
+
1
);
INDENT
(
+
1
);
if
(
utf8_full_alphabet_check
)
{
if
(
utf8_full_alphabet_check
)
{
OUT
(
"if(UTF8String_length((UTF8String_t *)sptr, td->name,
\n
"
);
OUT
(
"if(UTF8String_length((const UTF8String_t *)sptr) < 0)
\n
"
);
OUT
(
"
\t
app_errlog, app_key) == -1)
\n
"
);
OUT
(
"
\t
return -1; /* Alphabet (sic!) test failed. */
\n
"
);
OUT
(
"
\t\t
return -1; /* Alphabet (sic!) test failed. */
\n
"
);
OUT
(
"
\n
"
);
OUT
(
"
\n
"
);
}
else
{
}
else
{
if
(
use_table
)
{
if
(
use_table
)
{
...
@@ -511,8 +509,13 @@ emit_size_determination_code(arg_t *arg, asn1p_expr_type_e etype) {
...
@@ -511,8 +509,13 @@ emit_size_determination_code(arg_t *arg, asn1p_expr_type_e etype) {
OUT
(
"size = st->size >> 1;
\t
/* 2 byte per character */
\n
"
);
OUT
(
"size = st->size >> 1;
\t
/* 2 byte per character */
\n
"
);
break
;
break
;
case
ASN_STRING_UTF8String
:
case
ASN_STRING_UTF8String
:
OUT
(
"size = UTF8String_length(st, td->name, app_errlog, app_key);
\n
"
);
OUT
(
"size = UTF8String_length(st);
\n
"
);
OUT
(
"if(size == (size_t)-1) return -1;
\n
"
);
OUT
(
"if((ssize_t)size < 0) {
\n
"
);
OUT
(
"
\t
_ASN_ERRLOG(app_errlog, app_key,
\n
"
);
OUT
(
"
\t\t\"
%%s: UTF-8: broken encoding (%%s:%%d)
\"
,
\n
"
);
OUT
(
"
\t\t
td->name, __FILE__, __LINE__);
\n
"
);
OUT
(
"
\t
return -1;
\n
"
);
OUT
(
"}
\n
"
);
break
;
break
;
case
ASN_CONSTR_SET_OF
:
case
ASN_CONSTR_SET_OF
:
case
ASN_CONSTR_SEQUENCE_OF
:
case
ASN_CONSTR_SEQUENCE_OF
:
...
...
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