From: Adam Dickmeiss Date: Wed, 2 Oct 2013 13:45:19 +0000 (+0200) Subject: Fix SEGV for decoding invalid SRU requests X-Git-Tag: v1.4.0~1 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=82b21829b870f2347c6cf57ab61459c4f220b62b;p=metaproxy-moved-to-github.git Fix SEGV for decoding invalid SRU requests Incorrect reference to union (was explain response rather than search response). --- diff --git a/src/sru_util.cpp b/src/sru_util.cpp index da9aaa4..cf620bc 100644 --- a/src/sru_util.cpp +++ b/src/sru_util.cpp @@ -251,10 +251,10 @@ Z_SRW_PDU * mp_util::decode_sru_request(mp::Package &package, // closing connection if we did not ... if (0 == yaz_sru_decode(http_req, &sru_pdu_req, soap, odr_de, &charset, - &(sru_pdu_res->u.response->diagnostics), - &(sru_pdu_res->u.response->num_diagnostics))) + &(sru_pdu_res->u.explain_response->diagnostics), + &(sru_pdu_res->u.explain_response->num_diagnostics))) { - if (sru_pdu_res->u.response->num_diagnostics) + if (sru_pdu_res->u.explain_response->num_diagnostics) { //sru_pdu_res = sru_pdu_res_exp; package.session().close();