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 linux/hdmi: Fix strlcpy ...



details:   https://anonhg.NetBSD.org/src/rev/7c7735242354
branches:  trunk
changeset: 1028682:7c7735242354
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:45:20 2021 +0000

description:
linux/hdmi: Fix strlcpy abuse -- need strncpy to fill field.

diffstat:

 sys/external/bsd/drm2/include/linux/hdmi.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r d65c4864435a -r 7c7735242354 sys/external/bsd/drm2/include/linux/hdmi.h
--- a/sys/external/bsd/drm2/include/linux/hdmi.h        Sun Dec 19 11:45:13 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/hdmi.h        Sun Dec 19 11:45:20 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hdmi.h,v 1.11 2021/12/19 11:38:27 riastradh Exp $      */
+/*     $NetBSD: hdmi.h,v 1.12 2021/12/19 11:45:20 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -457,8 +457,8 @@
        hdmi_infoframe_header_init(&frame->header, HDMI_INFOFRAME_TYPE_SPD,
            1, HDMI_SPD_INFOFRAME_SIZE);
 
-       (void)strlcpy(frame->vendor, vendor, sizeof(frame->vendor));
-       (void)strlcpy(frame->product, product, sizeof(frame->product));
+       strncpy(frame->vendor, vendor, sizeof(frame->vendor));
+       strncpy(frame->product, product, sizeof(frame->product));
 
        return 0;
 }



Home | Main Index | Thread Index | Old Index