X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=gui.c;h=728fb9b72c815237ca5aa51c9d590afa312e0464;hb=a44fa6f118540d47cc575cbc62d22a6e4bb784e9;hp=a8a7fc9fb22c44aee4ec310467abba0fcade2e78;hpb=eb4d66692d738c7613333ef4dfb5b19fb17ab299;p=paraslash.git diff --git a/gui.c b/gui.c index a8a7fc9f..728fb9b7 100644 --- a/gui.c +++ b/gui.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1998-2012 Andre Noll + * Copyright (C) 1998-2013 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -951,7 +951,7 @@ static int open_stat_pipe(void) return ret; } -#define COMMAND_BUF_SIZE 4096 +#define COMMAND_BUF_SIZE 32768 /* * This is the core select loop. Besides the (internal) signal @@ -1023,6 +1023,10 @@ repeat: if (command_fds[!i] < 0) /* both fds closed */ return 0; } + if (cbo[i] == COMMAND_BUF_SIZE - 1) { + PARA_NOTICE_LOG("discarding overlong line"); + cbo[i] = 0; + } } } ret = read_stat_pipe(&rfds);