From bef149e2f81dbbef96cd5cd5bd0db053447025b2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 26 Jan 2011 17:57:54 +0100 Subject: Avoid memory corruption --- src/mosflm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mosflm.c b/src/mosflm.c index 6f27eb7d..11642cc8 100644 --- a/src/mosflm.c +++ b/src/mosflm.c @@ -397,7 +397,7 @@ static int mosflm_readable(struct image *image, struct mosflm_data *mosflm) /* Means the last value looked at is rbufpos-2 */ /* Is there a prompt in the buffer? */ - if ( (i+7 <= mosflm->rbufpos) + if ( (i+10 <= mosflm->rbufpos) && (!strncmp(mosflm->rbuffer+i, "MOSFLM => ", 10)) ) { block_ready = 1; type = MOSFLM_INPUT_PROMPT; -- cgit v1.2.3