X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Furi.c;h=6db68e5569a2e444704044fe564e49013e933782;hp=bae9a0a85860122839951a1ebf3f34a7f8b792f0;hb=028d5f9639695599a98f59ef8a59e7f03bc135f7;hpb=2614d567118004072591ae55a387d2cbb1d18130 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*));