X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=26aab7b54f840f4bfc48c341be56fccf2c860eb9;hp=601dafc28965561ba93cf7996788cf78f5a72597;hb=80184e0ebd6d82ad97874372236c2ad956e01d72;hpb=43a39e3fad856932e6f538bb05781d0430c58899 diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index 601dafc..26aab7b 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2011 Index Data + * Copyright (C) 1995-2012 Index Data * See the file LICENSE for details. */ /** \file zoomsh.c @@ -401,6 +401,12 @@ static int cmd_ext(ZOOM_connection *c, ZOOM_resultset *r, int ret = 0; WRBUF ext_type_str = next_token_new_wrbuf(args); + if (!ext_type_str) + { + printf("es: missing type " + "(itemorder, create, drop, commit, update, xmlupdate)\n"); + return 1; + } for (i = 0; i 999) + if (strlen(line_in) > sizeof(buf)-1) { printf("Input line too long\n"); res = 1; @@ -810,7 +816,7 @@ static int shell(ZOOM_connection *c, ZOOM_resultset *r, free(line_in); #else printf("ZOOM>"); fflush(stdout); - if (!fgets(buf, 999, stdin)) + if (!fgets(buf, sizeof(buf)-1, stdin)) { res = -1; break;