diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-01-26 17:57:54 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:12 +0100 |
commit | bef149e2f81dbbef96cd5cd5bd0db053447025b2 (patch) | |
tree | 7b6155b5261da3c8ba2cecba32327a4932747a72 | |
parent | e3a2807bedf1a1a9e25923ee9bc0db653c4c4033 (diff) |
Avoid memory corruption
-rw-r--r-- | src/mosflm.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |