From: Adam Dickmeiss Date: Wed, 24 Sep 2008 18:09:29 +0000 (+0200) Subject: Check the record syntax(es) given by the format command X-Git-Tag: v3.0.36~4^2~2 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=f59f3bba11d2db2fa291b736a98bf2f9f7e8f6c0;p=yaz-moved-to-github.git Check the record syntax(es) given by the format command Check the record syntax(es) given by the format command and report an error if they don't look good. --- diff --git a/client/client.c b/client/client.c index 4fd9406..c34d201 100644 --- a/client/client.c +++ b/client/client.c @@ -3278,6 +3278,12 @@ int cmd_format(const char *arg) { if (!strcmp(form_str, "none")) break; + if (!yaz_string_to_oid_odr(yaz_oid_std(), CLASS_RECSYN, form_str, out)) + { + printf("Bad format: %s\n", form_str); + recordsyntax_size = 0; + return 0; + } recordsyntax_list[idx] = xstrdup(form_str); cp += nor; idx++;