Commit 24df0905 authored by Botond Baranyi's avatar Botond Baranyi
Browse files

Fixed RAW encoding of INT_MIN... for real this time (bug 533067)



Change-Id: I5d6ed79fbb652c0498a23215b64b1b62897bef11
Signed-off-by: Botond Baranyi's avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent a606c111
......@@ -1132,8 +1132,7 @@ int INTEGER::RAW_encode(const TTCN_Typedescriptor_t& p_td, RAW_enc_tree& myleaf)
value = 0;
neg_sgbit = FALSE;
}
if (value != 0 && value == -value) {
// value == -INT_MAX-1 a.k.a. INT_MIN a.k.a. 0x8000....
if (value == INT_MIN) {
INTEGER big_value(to_openssl(val.native)); // too big for native
return big_value.RAW_encode_openssl(p_td, myleaf);
}
......
......@@ -2679,7 +2679,7 @@ testcase TC_record_with_EXTENSION_BIT_5() runs on TempComp{
if ((enc_RAW_PDU_127(i) == o)and(dec_RAW_PDU_127(o) == i )) {setverdict(pass);}
else {setverdict(fail,"enc_RAW_PDU_127(i)= ", enc_RAW_PDU_127(i), "; dec_RAW_PDU_127(o)= ", dec_RAW_PDU_127(o));}}
else {setverdict(fail,"enc_RAW_PDU_127(i)= ", enc_RAW_PDU_127(i), "; dec_RAW_PDU_127(o)= ", dec_RAW_PDU_127(o));}
}
// Test of record with EXTENSION_BIT 6
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment