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
4f530b52
Commit
4f530b52
authored
Oct 19, 2006
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memory leak fixed in SET OF / SEQUENCE OF in wrong encoding processing
parent
9ab21b89
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
ChangeLog
ChangeLog
+2
-0
skeletons/constr_SET_OF.c
skeletons/constr_SET_OF.c
+11
-0
No files found.
ChangeLog
View file @
4f530b52
...
...
@@ -10,6 +10,8 @@
* Multiple enhancements by Daniele Varrazzo <daniele.varrazzo@gmail.com>
* Fixed explicit tagging of an in-lined constructed type.
(Severity: low; Security impact: none).
* Memory leak fixed in SET OF / SEQUENCE OF when wrong encoding
is encountered. (Severity: medium; Security impact: low)
0.9.21: 2006-Sep-17
...
...
skeletons/constr_SET_OF.c
View file @
4f530b52
...
...
@@ -227,6 +227,8 @@ SET_OF_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
}
/* Fall through */
case
RC_FAIL
:
/* Fatal error */
ASN_STRUCT_FREE
(
*
elm
->
type
,
ctx
->
ptr
);
ctx
->
ptr
=
0
;
RETURN
(
RC_FAIL
);
}
/* switch(rval) */
...
...
@@ -787,8 +789,10 @@ SET_OF_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
void
SET_OF_free
(
asn_TYPE_descriptor_t
*
td
,
void
*
ptr
,
int
contents_only
)
{
if
(
td
&&
ptr
)
{
asn_SET_OF_specifics_t
*
specs
;
asn_TYPE_member_t
*
elm
=
td
->
elements
;
asn_anonymous_set_
*
list
=
_A_SET_FROM_VOID
(
ptr
);
asn_struct_ctx_t
*
ctx
;
/* Decoder context */
int
i
;
/*
...
...
@@ -807,6 +811,13 @@ SET_OF_free(asn_TYPE_descriptor_t *td, void *ptr, int contents_only) {
if
(
!
contents_only
)
{
FREEMEM
(
ptr
);
}
specs
=
(
asn_SET_OF_specifics_t
*
)
td
->
specifics
;
ctx
=
(
asn_struct_ctx_t
*
)((
char
*
)
ptr
+
specs
->
ctx_offset
);
if
(
ctx
->
ptr
)
{
ASN_STRUCT_FREE
(
*
elm
->
type
,
ctx
->
ptr
);
ctx
->
ptr
=
0
;
}
}
}
...
...
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