Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/udf Replace the variable field data[0] to data[1] to ...



details:   https://anonhg.NetBSD.org/src/rev/e3bf878b9a66
branches:  trunk
changeset: 363946:e3bf878b9a66
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Fri Mar 18 16:06:18 2022 +0000

description:
Replace the variable field data[0] to data[1] to avoid undefined behaviour.

diffstat:

 sys/fs/udf/ecma167-udf.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 58db4bdb546f -r e3bf878b9a66 sys/fs/udf/ecma167-udf.h
--- a/sys/fs/udf/ecma167-udf.h  Thu Mar 17 23:05:01 2022 +0000
+++ b/sys/fs/udf/ecma167-udf.h  Fri Mar 18 16:06:18 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ecma167-udf.h,v 1.16 2018/08/09 13:49:30 reinoud Exp $ */
+/* $NetBSD: ecma167-udf.h,v 1.17 2022/03/18 16:06:18 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2003, 2004, 2005, 2006, 2008, 2009, 2017, 2018
@@ -651,7 +651,7 @@
        uint8_t                 l_fi;   /* Length of file identifier area */
        struct long_ad          icb;
        uint16_t                l_iu;   /* Length of implementation use area */
-       uint8_t                 data[0];
+       uint8_t                 data[1];
 } __packed;
 #define        UDF_FID_SIZE    38
 #define        UDF_FILE_CHAR_VIS       (1 << 0) /* Invisible */



Home | Main Index | Thread Index | Old Index