blob: 5b112245acae72274a3bfb933830b0d13482c945 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
$NetBSD: patch-cg,v 1.4 2007/09/18 23:07:27 wiz Exp $
--- mkisofs/write.c.orig 2007-08-20 16:35:48.000000000 +0000
+++ mkisofs/write.c
@@ -372,7 +372,7 @@ write_one_file(filename, size, outfile)
static char buffer[SECTOR_SIZE * NSECT];
FILE *infile;
off_t remain;
- int use;
+ off_t use;
int unroundeduse;
int bytestowrite = 0; /* Dummy init. to serve GCC bug */
int correctedsize = 0;
@@ -499,7 +499,10 @@ static char buffer[SECTOR_SIZE * NSECT]
fflush(stderr);
}
#endif
- remain -= use;
+ if (use > remain)
+ remain = 0;
+ else
+ remain -= use;
}
#ifdef APPLE_HYB
#if defined(INSERTMACRESFORK) && defined(UDF)
|