Browse code

update cryptff

aCaB authored on 2012/01/19 02:46:32
Showing 1 changed files
... ...
@@ -1422,7 +1422,7 @@ static int cli_scancryptff(cli_ctx *ctx)
1422 1422
 	return CL_ECREAT;
1423 1423
     }
1424 1424
 
1425
-    for(; src = fmap_need_off_once_len(*ctx->fmap, pos, FILEBUFF, &bread); pos += bread) {
1425
+    for(; (src = fmap_need_off_once_len(*ctx->fmap, pos, FILEBUFF, &bread)) && bread; pos += bread) {
1426 1426
 	for (i=0;i<bread;i++)
1427 1427
 	    dest[i] = src[i] ^ (unsigned char) 0xff;
1428 1428
 	if(cli_writen(ndesc, dest, bread) == -1) {