lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1495581953-5523-1-git-send-email-karim.eshapa@gmail.com>
Date:   Wed, 24 May 2017 01:25:53 +0200
From:   Karim Eshapa <karim.eshapa@...il.com>
To:     robert.moore@...el.com
Cc:     lv.zheng@...el.com, rafael.j.wysocki@...el.com, lenb@...nel.org,
        linux-acpi@...r.kernel.org, devel@...ica.org,
        linux-kernel@...r.kernel.org, Karim Eshapa <karim.eshapa@...il.com>
Subject: [PATCH] acpi: acpica: dbfileio: Use strlcpy to Copy a C-string into a sized buffer

Use strlcpy with sized buffer instead of strncpy to
avoid non NUL-terminated source strings problems.

Signed-off-by: Karim Eshapa <karim.eshapa@...il.com>
---
 drivers/acpi/acpica/dbfileio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/dbfileio.c b/drivers/acpi/acpica/dbfileio.c
index 4d81ea2..f0f22f1 100644
--- a/drivers/acpi/acpica/dbfileio.c
+++ b/drivers/acpi/acpica/dbfileio.c
@@ -99,7 +99,7 @@ void acpi_db_open_debug_file(char *name)
 	}
 
 	acpi_os_printf("Debug output file %s opened\n", name);
-	strncpy(acpi_gbl_db_debug_filename, name,
+	strlcpy(acpi_gbl_db_debug_filename, name,
 		sizeof(acpi_gbl_db_debug_filename));
 	acpi_gbl_db_output_to_file = TRUE;
 }
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ