Module Name: src Committed By: joe Date: Thu Feb 13 16:07:41 UTC 2025
Modified Files: src/sys/dev/pci: if_gem_pci.c Log Message: fix: wrong size of buffer limit used when reading through the pci bus use the GEM_TMP_BUFSIZE rather than the sizeof pointer To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/if_gem_pci.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/dev/pci/if_gem_pci.c diff -u src/sys/dev/pci/if_gem_pci.c:1.52 src/sys/dev/pci/if_gem_pci.c:1.53 --- src/sys/dev/pci/if_gem_pci.c:1.52 Thu Jul 2 09:02:04 2020 +++ src/sys/dev/pci/if_gem_pci.c Thu Feb 13 16:07:40 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: if_gem_pci.c,v 1.52 2020/07/02 09:02:04 msaitoh Exp $ */ +/* $NetBSD: if_gem_pci.c,v 1.53 2025/02/13 16:07:40 joe Exp $ */ /* * @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_gem_pci.c,v 1.52 2020/07/02 09:02:04 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gem_pci.c,v 1.53 2025/02/13 16:07:40 joe Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -263,7 +263,7 @@ gem_pci_attach(device_t parent, device_t /* read PCI Expansion PROM Header */ bus_space_read_region_1(sc->sc_bustag, - romh, 0, buf, sizeof buf); + romh, 0, buf, GEM_TMP_BUFSIZE); /* Check for "shared-pins = serdes" in FCode. */ i = 0;