X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=238c3d9799baf6382558cdf91737bfb9771cd5e0;hb=f938f90db302b31bdd72b86ca3f9671c7199a4f1;hp=601dafc28965561ba93cf7996788cf78f5a72597;hpb=43a39e3fad856932e6f538bb05781d0430c58899;p=yaz-moved-to-github.git diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index 601dafc..238c3d9 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 @@ -785,7 +785,7 @@ static int shell(ZOOM_connection *c, ZOOM_resultset *r, int res = 0; while (res == 0) { - char buf[1000]; + char buf[100000]; char *cp; const char *bp = buf; #if HAVE_READLINE_READLINE_H @@ -800,7 +800,7 @@ static int shell(ZOOM_connection *c, ZOOM_resultset *r, if (*line_in) add_history(line_in); #endif - if (strlen(line_in) > 999) + if (strlen(line_in) > sizeof(buf)-1) { printf("Input line too long\n"); res = 1; @@ -810,7 +810,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;