Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/fs/udf Pull up following revision(s) (requested by re...



details:   https://anonhg.NetBSD.org/src/rev/160cc2ad319f
branches:  netbsd-6
changeset: 776421:160cc2ad319f
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Sep 07 15:57:35 2013 +0000

description:
Pull up following revision(s) (requested by reinoud in ticket #930):
        sys/fs/udf/udf_allocation.c: revision 1.34
Fix 32 bit issue in main file read-in function. On both 32 bit and 64 bit
hosts a missing cast would result in `garbage' after the 4Gbyte limit.

diffstat:

 sys/fs/udf/udf_allocation.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (43 lines):

diff -r 404f8d28d2a7 -r 160cc2ad319f sys/fs/udf/udf_allocation.c
--- a/sys/fs/udf/udf_allocation.c       Mon Aug 26 04:06:25 2013 +0000
+++ b/sys/fs/udf/udf_allocation.c       Sat Sep 07 15:57:35 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_allocation.c,v 1.32 2011/06/16 09:21:02 hannken Exp $ */
+/* $NetBSD: udf_allocation.c,v 1.32.8.1 2013/09/07 15:57:35 bouyer Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.32 2011/06/16 09:21:02 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.32.8.1 2013/09/07 15:57:35 bouyer Exp $");
 #endif /* not lint */
 
 
@@ -586,7 +586,7 @@
 
                        end_foffset = foffset + len;
 
-                       if (end_foffset > lb_num * lb_size)
+                       if (end_foffset > (uint64_t) lb_num * lb_size)
                                break;  /* found */
                        foffset = end_foffset;
                        slot++;
@@ -724,13 +724,13 @@
 
                end_foffset = foffset + len;
 
-               if (end_foffset > from * lb_size)
+               if (end_foffset > (uint64_t) from * lb_size)
                        break;  /* found */
                foffset = end_foffset;
                slot++;
        }
        /* found overlapping slot */
-       ext_offset = from * lb_size - foffset;
+       ext_offset = (uint64_t) from * lb_size - foffset;
 
        for (;;) {
                udf_get_adslot(udf_node, slot, &s_ad, &eof);



Home | Main Index | Thread Index | Old Index