Module Name: src
Committed By: reinoud
Date: Wed May 15 11:01:27 UTC 2024
Modified Files:
src/sys/fs/cd9660: cd9660_vfsops.c
Log Message:
Fixing potential, though unlikely overflow as detected by coverity scan
To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/fs/cd9660/cd9660_vfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/fs/cd9660/cd9660_vfsops.c
diff -u src/sys/fs/cd9660/cd9660_vfsops.c:1.103 src/sys/fs/cd9660/cd9660_vfsops.c:1.104
--- src/sys/fs/cd9660/cd9660_vfsops.c:1.103 Sat Feb 3 22:39:27 2024
+++ src/sys/fs/cd9660/cd9660_vfsops.c Wed May 15 11:01:27 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_vfsops.c,v 1.103 2024/02/03 22:39:27 christos Exp $ */
+/* $NetBSD: cd9660_vfsops.c,v 1.104 2024/05/15 11:01:27 reinoud Exp $ */
/*-
* Copyright (c) 1994
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.103 2024/02/03 22:39:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.104 2024/05/15 11:01:27 reinoud Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -845,7 +845,7 @@ cd9660_loadvnode(struct mount *mp, struc
struct buf *bp2;
if ((imp->im_flags & ISOFSMNT_EXTATT)
&& (off = isonum_711(isodir->ext_attr_length)))
- cd9660_blkatoff(vp, (off_t)-(off << imp->im_bshift),
+ cd9660_blkatoff(vp, -((off_t) off << imp->im_bshift),
NULL, &bp2);
else
bp2 = NULL;