From 491161293151469238794cafeaddc6f367f665db Mon Sep 17 00:00:00 2001 From: reinoud Date: Tue, 19 Sep 2006 22:00:38 +0000 Subject: [PATCH] Fix serious file-corruption issue on sparable partitions. --- sys/fs/udf/udf_subr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/fs/udf/udf_subr.c b/sys/fs/udf/udf_subr.c index 0b7a4327878f..c8efcfcf71dd 100644 --- a/sys/fs/udf/udf_subr.c +++ b/sys/fs/udf/udf_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: udf_subr.c,v 1.16 2006/09/19 15:34:23 reinoud Exp $ */ +/* $NetBSD: udf_subr.c,v 1.17 2006/09/19 22:00:38 reinoud Exp $ */ /* * Copyright (c) 2006 Reinoud Zandijk @@ -36,7 +36,7 @@ #include #ifndef lint -__RCSID("$NetBSD: udf_subr.c,v 1.16 2006/09/19 15:34:23 reinoud Exp $"); +__RCSID("$NetBSD: udf_subr.c,v 1.17 2006/09/19 22:00:38 reinoud Exp $"); #endif /* not lint */ @@ -2825,6 +2825,7 @@ udf_translate_file_extent(struct udf_node *node, translen = overlap; while (overlap && pages && translen) { *map++ = transsec; + lb_num++; overlap--; pages--; translen--; } break; @@ -2838,7 +2839,7 @@ udf_translate_file_extent(struct udf_node *node, return error; while (overlap && pages && translen) { *map++ = transsec; - transsec++; + lb_num++; transsec++; overlap--; pages--; translen--; } break;