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
69c73dc6
Commit
69c73dc6
authored
Feb 21, 2012
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some reentrancy protection
parent
b4c2ca80
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
skeletons/asn_internal.h
skeletons/asn_internal.h
+2
-0
skeletons/per_opentype.c
skeletons/per_opentype.c
+4
-6
No files found.
skeletons/asn_internal.h
View file @
69c73dc6
...
@@ -37,8 +37,10 @@ int get_asn1c_environment_version(void); /* Run-time version */
...
@@ -37,8 +37,10 @@ int get_asn1c_environment_version(void); /* Run-time version */
#ifdef __GNUC__
#ifdef __GNUC__
#ifdef ASN_THREAD_SAFE
#ifdef ASN_THREAD_SAFE
#define asn_debug_indent 0
#define asn_debug_indent 0
#define ASN_DEBUG_INDENT_ADD(i) do{}while(0)
#else
/* !ASN_THREAD_SAFE */
#else
/* !ASN_THREAD_SAFE */
int
asn_debug_indent
;
int
asn_debug_indent
;
#define ASN_DEBUG_INDENT_ADD(i) do { asn_debug_indent += increment; } while(0)
#endif
/* ASN_THREAD_SAFE */
#endif
/* ASN_THREAD_SAFE */
#define ASN_DEBUG(fmt, args...) do { \
#define ASN_DEBUG(fmt, args...) do { \
int adi = asn_debug_indent; \
int adi = asn_debug_indent; \
...
...
skeletons/per_opentype.c
View file @
69c73dc6
...
@@ -18,8 +18,6 @@ static int uper_ugot_refill(asn_per_data_t *pd);
...
@@ -18,8 +18,6 @@ static int uper_ugot_refill(asn_per_data_t *pd);
static
int
per_skip_bits
(
asn_per_data_t
*
pd
,
int
skip_nbits
);
static
int
per_skip_bits
(
asn_per_data_t
*
pd
,
int
skip_nbits
);
static
asn_dec_rval_t
uper_sot_suck
(
asn_codec_ctx_t
*
,
asn_TYPE_descriptor_t
*
td
,
asn_per_constraints_t
*
constraints
,
void
**
sptr
,
asn_per_data_t
*
pd
);
static
asn_dec_rval_t
uper_sot_suck
(
asn_codec_ctx_t
*
,
asn_TYPE_descriptor_t
*
td
,
asn_per_constraints_t
*
constraints
,
void
**
sptr
,
asn_per_data_t
*
pd
);
int
asn_debug_indent
;
/*
/*
* Encode an "open type field".
* Encode an "open type field".
* #10.1, #10.2
* #10.1, #10.2
...
@@ -101,9 +99,9 @@ uper_open_type_get_simple(asn_codec_ctx_t *ctx, asn_TYPE_descriptor_t *td,
...
@@ -101,9 +99,9 @@ uper_open_type_get_simple(asn_codec_ctx_t *ctx, asn_TYPE_descriptor_t *td,
spd
.
buffer
=
buf
;
spd
.
buffer
=
buf
;
spd
.
nbits
=
bufLen
<<
3
;
spd
.
nbits
=
bufLen
<<
3
;
asn_debug_indent
+=
4
;
ASN_DEBUG_INDENT_ADD
(
+
4
)
;
rv
=
td
->
uper_decoder
(
ctx
,
td
,
constraints
,
sptr
,
&
spd
);
rv
=
td
->
uper_decoder
(
ctx
,
td
,
constraints
,
sptr
,
&
spd
);
asn_debug_indent
-=
4
;
ASN_DEBUG_INDENT_ADD
(
-
4
)
;
if
(
rv
.
code
==
RC_OK
)
{
if
(
rv
.
code
==
RC_OK
)
{
/* Check padding validity */
/* Check padding validity */
...
@@ -153,9 +151,9 @@ uper_open_type_get_complex(asn_codec_ctx_t *ctx, asn_TYPE_descriptor_t *td,
...
@@ -153,9 +151,9 @@ uper_open_type_get_complex(asn_codec_ctx_t *ctx, asn_TYPE_descriptor_t *td,
pd
->
nbits
=
pd
->
nboff
;
/* 0 good bits at this point, will refill */
pd
->
nbits
=
pd
->
nboff
;
/* 0 good bits at this point, will refill */
pd
->
moved
=
0
;
/* This now counts the open type size in bits */
pd
->
moved
=
0
;
/* This now counts the open type size in bits */
asn_debug_indent
+=
4
;
ASN_DEBUG_INDENT_ADD
(
+
4
)
;
rv
=
td
->
uper_decoder
(
ctx
,
td
,
constraints
,
sptr
,
pd
);
rv
=
td
->
uper_decoder
(
ctx
,
td
,
constraints
,
sptr
,
pd
);
asn_debug_indent
-=
4
;
ASN_DEBUG_INDENT_ADD
(
-
4
)
;
#define UPDRESTOREPD do { \
#define UPDRESTOREPD do { \
/* buffer and nboff are valid, preserve them. */
\
/* buffer and nboff are valid, preserve them. */
\
...
...
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