Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/include/linux Fix array_size. Helps to...



details:   https://anonhg.NetBSD.org/src/rev/5bd656cf0df5
branches:  trunk
changeset: 1028457:5bd656cf0df5
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:05:40 2021 +0000

description:
Fix array_size. Helps to multiply, not add.

diffstat:

 sys/external/bsd/drm2/include/linux/overflow.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r ef09a5004bd4 -r 5bd656cf0df5 sys/external/bsd/drm2/include/linux/overflow.h
--- a/sys/external/bsd/drm2/include/linux/overflow.h    Sun Dec 19 11:05:33 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/overflow.h    Sun Dec 19 11:05:40 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: overflow.h,v 1.3 2021/12/19 10:50:30 riastradh Exp $   */
+/*     $NetBSD: overflow.h,v 1.4 2021/12/19 11:05:40 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
 {
        size_t xy;
 
-       if (check_add_overflow(x, y, &xy))
+       if (check_mul_overflow(x, y, &xy))
                return SIZE_MAX;
        return xy;
 }



Home | Main Index | Thread Index | Old Index