summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2008-12-19 15:16:08 +0000
committerphintuka <phintuka>2008-12-19 15:16:08 +0000
commit97640c31761bca148b2086fdc36736e1850cafb1 (patch)
tree7324fac7334bda086fc48a74fa2666c2e4d79187
parentd9cafb37d27b0b22c21202f0242c4ff6949f6a85 (diff)
downloadxineliboutput-97640c31761bca148b2086fdc36736e1850cafb1.tar.gz
xineliboutput-97640c31761bca148b2086fdc36736e1850cafb1.tar.bz2
Check for very large sizes when reading grab result
Increased timeout for reading grab result
-rw-r--r--frontend_svr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/frontend_svr.c b/frontend_svr.c
index b16e1fa9..62669d1d 100644
--- a/frontend_svr.c
+++ b/frontend_svr.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend_svr.c,v 1.64 2008-12-19 15:15:07 phintuka Exp $
+ * $Id: frontend_svr.c,v 1.65 2008-12-19 15:16:08 phintuka Exp $
*
*/
@@ -1189,10 +1189,10 @@ void cXinelibServer::Handle_Control_GRAB(int cli, const char *arg)
cGrabReplyFuture *f;
int token = -1, size = 0;
if(2 == sscanf(arg, "%d %d", &token, &size)) {
- if(size > 0) {
+ if(size > 0 && size < 20480000) {
uchar *result = (uchar*)malloc(size);
Unlock(); /* may take a while ... */
- ssize_t n = fd_control[cli].read(result, size, 1000);
+ ssize_t n = fd_control[cli].read(result, size, 2000);
Lock();
if(n == size) {
if(NULL != (f = (cGrabReplyFuture*)m_Futures->Get(token))) {