Skip to content
Snippets Groups Projects
Commit b6370126 authored by BenceJanosSzabo's avatar BenceJanosSzabo
Browse files

Segmentation fault fix, when explicitly unspecifield field is present


Change-Id: Id5f118f22f33723ed1290ef939bd6a7c0292a228
Signed-off-by: default avatarBenceJanosSzabo <bence.janos.szabo@ericsson.com>
parent 998599e1
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@
* Raduly, Csaba
* Szabados, Kristof
* Szabo, Janos Zoltan – initial implementation
* Szabo, Bence Janos
* Szalai, Gabor
* Tatarka, Gabor
* Zalanyi, Balazs Andor
......@@ -1978,6 +1979,8 @@ void SubType::chk_this_template(Template *templ)
case Template::USTR_PATTERN:
chk_this_template_pattern("universal charstring", templ);
break;
case Template::TEMPLATE_NOTUSED:
break;
case Template::TEMPLATE_ERROR:
break;
default:
......
......@@ -8,6 +8,7 @@
.* Contributors:
.* Balasko, Jeno
.* Baranyi, Botond
.* Szabo, Bence Janos
.*
.******************************************************************************/
:text.
......@@ -67,6 +68,9 @@ A 2014-04-29 EBOTBAR New document
.*---------------------------------------------------------------------*
:h3. Encoding record with any element from unqualified namespace
.*---------------------------------------------------------------------*
.*---------------------------------------------------------------------*
:h4. Encoding record template with explicitly unspecified field
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Encoding record with any element from unqualified namespace>
......@@ -1229,6 +1233,51 @@ Dynamic test case error: While XER-decoding type '@Temp.any_elem_rec_of': Index
:exmp.
.*---------------------------------------------------------------------*
:h4. Encoding record template with explicitly unspecified field
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Encoding record template with explicitly unspecified field>
<STATIC>
type component Test_CT{};
<TTCN_TC:PURE_EXEC>
type record MyType
{
universal charstring foo
}
with {
encode "XML";
variant "element";
};
external function ef_xer_enc(in MyType par) return octetstring
with { extension "prototype(convert) encode (XER:XER_EXTENDED) errorbehavior(ALL:ERROR)" }
testcase tc_enc_explicitly_unspecified() runs on Test_CT {
template MyType myTemp := { foo := - };
var octetstring v_res := ef_xer_enc(valueof(myTemp));
setverdict(pass);
}
control {
execute(tc_enc_explicitly_unspecified());
}
<RESULT>
Dynamic test case error: Performing valueof or send operation on a non-specific template of type @Temp.MyType
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h1.REFERENCES
.*---------------------------------------------------------------------*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment