From: Adam Dickmeiss Date: Mon, 12 Nov 2012 18:11:17 +0000 (+0100) Subject: Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/yaz X-Git-Tag: v4.2.45~5 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=1179b3374af000f211421b038e748d1ab4357a7a;hp=b9258ca92b04e55253794ff5f3bbaef312897b10 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/yaz --- diff --git a/client/client.c b/client/client.c index bbce995..5e7f270 100644 --- a/client/client.c +++ b/client/client.c @@ -1698,11 +1698,7 @@ static void display_facet(Z_FacetField *facet) { Z_AttributeList *al = facet->attributes; struct yaz_facet_attr attr_values; - attr_values.errcode = 0; - attr_values.limit = -1; - attr_values.useattr = "NONE"; - attr_values.relation = "default"; - + yaz_facet_attr_init(&attr_values); yaz_facet_attr_get_z_attributes(al, &attr_values); if (!attr_values.errcode) { diff --git a/src/srwutil.c b/src/srwutil.c index f7c8a2f..c0e496b 100644 --- a/src/srwutil.c +++ b/src/srwutil.c @@ -466,8 +466,11 @@ int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, (*l)->next = 0; } else - yaz_add_srw_diagnostic(decode, diag, num_diag, - YAZ_SRW_UNSUPP_PARAMETER, n); + { + if (*num_diag < 10) + yaz_add_srw_diagnostic(decode, diag, num_diag, + YAZ_SRW_UNSUPP_PARAMETER, n); + } } } if (!version) diff --git a/src/uri.c b/src/uri.c index bae9a0a..6db68e5 100644 --- a/src/uri.c +++ b/src/uri.c @@ -132,6 +132,13 @@ int yaz_uri_to_array(const char *path, ODR o, char ***name, char ***val) { cp++; no++; + while (*cp != '=') + { + /* check that x-form names looks sane */ + if (*cp <= ' ' || *cp >= 127) + return 0; + cp++; + } } *name = (char **) odr_malloc(o, no * sizeof(char*)); *val = (char **) odr_malloc(o, no * sizeof(char*));