Source-Changes-HG archive

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

[src/netbsd-3-0]: src/sys/dev Pull up following revision(s) (requested by cub...



details:   https://anonhg.NetBSD.org/src/rev/306647e534ea
branches:  netbsd-3-0
changeset: 579360:306647e534ea
user:      ghen <ghen%NetBSD.org@localhost>
date:      Mon Dec 18 20:26:55 2006 +0000

description:
Pull up following revision(s) (requested by cube in ticket #1530):
        sys/dev/vnd.c: revision 1.153
Don't accept a compressed image that has 0 for the block size...
Fixes PR#34608.

diffstat:

 sys/dev/vnd.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r f62c15badcc7 -r 306647e534ea sys/dev/vnd.c
--- a/sys/dev/vnd.c     Mon Dec 11 13:25:27 2006 +0000
+++ b/sys/dev/vnd.c     Mon Dec 18 20:26:55 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnd.c,v 1.111.10.5 2005/10/07 11:47:40 tron Exp $      */
+/*     $NetBSD: vnd.c,v 1.111.10.5.2.1 2006/12/18 20:26:55 ghen Exp $  */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.111.10.5 2005/10/07 11:47:40 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.111.10.5.2.1 2006/12/18 20:26:55 ghen Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "fs_nfs.h"
@@ -919,7 +919,8 @@
                         /* note last offset is the file byte size */
                         vnd->sc_comp_numoffs = ntohl(ch->num_blocks)+1;
                         free(ch, M_TEMP);
-                        if(vnd->sc_comp_blksz % DEV_BSIZE !=0) {
+                        if (vnd->sc_comp_blksz == 0 ||
+                            vnd->sc_comp_blksz % DEV_BSIZE !=0) {
                                 VOP_UNLOCK(nd.ni_vp, 0);
                                 error = EINVAL;
                                 goto close_and_exit;



Home | Main Index | Thread Index | Old Index