X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=26aab7b54f840f4bfc48c341be56fccf2c860eb9;hp=a8ec761434e90a38f34ce67149871178e622a3bd;hb=80184e0ebd6d82ad97874372236c2ad956e01d72;hpb=77c5a4fca8b516fd39b8ba213daed17a465a6b2a diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index a8ec761..26aab7b 100644 --- a/zoom/zoomsh.c +++ b/zoom/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;