Issue with WSDL2C java generator? (version distribution-SNAPSHOT-bin.zip
15-Mar-2008 02:44 )
I used the WSDL2C tool to gen ADB code for my axis2c client/service. I
noticed that all the sections inside "adb_clasXXX_serialize()" with the
comment "parsing xxx element" seem to create to variables called
"end_input_str" and "start_input_str". After the code calls
"auxutil_stream_write()" for both variables, the code calls AXIS2_FREE()
on "end_input_str" in both cases (so "start_input_str" does not get
deleted). This causes a glibc "double free or corrupt" problem.
--snip--
/*
* parsing areaID element
*/
sprintf(start_input_str, "<%s%sareaID>",
p_prefix?p_prefix:"",
(p_prefix && axutil_strcmp(p_prefix,
""))?":":"");
start_input_str_len =
axutil_strlen(start_input_str);
sprintf(end_input_str, "</%s%sareaID>",
p_prefix?p_prefix:"",
(p_prefix && axutil_strcmp(p_prefix,
""))?":":"");
end_input_str_len =
axutil_strlen(end_input_str);
text_value_3 = _RegReq->property_areaID;
axutil_stream_write(stream, env,
start_input_str, start_input_str_len);
AXIS2_FREE(env->allocator,end_input_str);
text_value_3_temp =
axutil_xml_quote_string(env, text_value_3, AXIS2_TRUE);
if (text_value_3_temp)
{
axutil_stream_write(stream, env,
text_value_3_temp, axutil_strlen(text_value_3_temp));
AXIS2_FREE(env->allocator,
text_value_3_temp);
}
else
{
axutil_stream_write(stream, env,
text_value_3, axutil_strlen(text_value_3));
}
axutil_stream_write(stream, env,
end_input_str, end_input_str_len);
AXIS2_FREE(env->allocator,end_input_str);
Thanks