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
309f193a
Commit
309f193a
authored
Dec 16, 2023
by
v0-e
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SEQUENCE_free, CHOICE_free null pointer check fix
parent
bbde80f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
skeletons/constr_CHOICE.c
skeletons/constr_CHOICE.c
+3
-2
skeletons/constr_SEQUENCE.c
skeletons/constr_SEQUENCE.c
+3
-2
No files found.
skeletons/constr_CHOICE.c
View file @
309f193a
...
@@ -156,13 +156,14 @@ CHOICE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
...
@@ -156,13 +156,14 @@ CHOICE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
void
void
CHOICE_free
(
const
asn_TYPE_descriptor_t
*
td
,
void
*
ptr
,
CHOICE_free
(
const
asn_TYPE_descriptor_t
*
td
,
void
*
ptr
,
enum
asn_struct_free_method
method
)
{
enum
asn_struct_free_method
method
)
{
const
asn_CHOICE_specifics_t
*
specs
=
const
asn_CHOICE_specifics_t
*
specs
;
(
const
asn_CHOICE_specifics_t
*
)
td
->
specifics
;
unsigned
present
;
unsigned
present
;
if
(
!
td
||
!
ptr
)
if
(
!
td
||
!
ptr
)
return
;
return
;
specs
=
(
const
asn_CHOICE_specifics_t
*
)
td
->
specifics
;
ASN_DEBUG
(
"Freeing %s as CHOICE"
,
td
->
name
);
ASN_DEBUG
(
"Freeing %s as CHOICE"
,
td
->
name
);
/*
/*
...
...
skeletons/constr_SEQUENCE.c
View file @
309f193a
...
@@ -68,13 +68,14 @@ void
...
@@ -68,13 +68,14 @@ void
SEQUENCE_free
(
const
asn_TYPE_descriptor_t
*
td
,
void
*
sptr
,
SEQUENCE_free
(
const
asn_TYPE_descriptor_t
*
td
,
void
*
sptr
,
enum
asn_struct_free_method
method
)
{
enum
asn_struct_free_method
method
)
{
size_t
edx
;
size_t
edx
;
const
asn_SEQUENCE_specifics_t
*
specs
=
const
asn_SEQUENCE_specifics_t
*
specs
;
(
const
asn_SEQUENCE_specifics_t
*
)
td
->
specifics
;
asn_struct_ctx_t
*
ctx
;
/* Decoder context */
asn_struct_ctx_t
*
ctx
;
/* Decoder context */
if
(
!
td
||
!
sptr
)
if
(
!
td
||
!
sptr
)
return
;
return
;
specs
=
(
const
asn_SEQUENCE_specifics_t
*
)
td
->
specifics
;
ASN_DEBUG
(
"Freeing %s as SEQUENCE"
,
td
->
name
);
ASN_DEBUG
(
"Freeing %s as SEQUENCE"
,
td
->
name
);
for
(
edx
=
0
;
edx
<
td
->
elements_count
;
edx
++
)
{
for
(
edx
=
0
;
edx
<
td
->
elements_count
;
edx
++
)
{
...
...
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