Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/ieee1394/fwdev.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/ieee1394/fwdev.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.6 retrieving revision 1.7 diff -u -p -r1.6 -r1.7 --- src/sys/dev/ieee1394/fwdev.c 2006/11/16 01:32:59 1.6 +++ src/sys/dev/ieee1394/fwdev.c 2006/11/16 14:35:07 1.7 @@ -1,4 +1,4 @@ -/* $NetBSD: fwdev.c,v 1.6 2006/11/16 01:32:59 christos Exp $ */ +/* $NetBSD: fwdev.c,v 1.7 2006/11/16 14:35:07 elad Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -845,7 +845,7 @@ out: else len = fwdev->rommax - CSRROMOFF + 4; } - if (crom_buf->len < len) + if (crom_buf->len > 0 && crom_buf->len < len) len = crom_buf->len; else crom_buf->len = len;