[haiku-commits] haiku: hrev54661 - src/add-ons/accelerants/matrox

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 18 Oct 2020 03:57:57 -0400 (EDT)

hrev54661 adds 1 changeset to branch 'master'
old head: 7f83301d7caa07b77d530d3ee35d5d77b712df95
new head: 4b15c3739bcd147577446c0321e53ed16bcc398c
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=4b15c3739bcd+%5E7f83301d7caa

----------------------------------------------------------------------------

4b15c3739bcd: accelerants/matrox: Fix -Wformat-security
  
  Change-Id: Ib9fa1361dc364ca9b4e0da676b67ed3b695259da
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/3332
  Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>

                                      [ Murai Takashi <tmurai01@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev54661
Commit:      4b15c3739bcd147577446c0321e53ed16bcc398c
URL:         https://git.haiku-os.org/haiku/commit/?id=4b15c3739bcd
Author:      Murai Takashi <tmurai01@xxxxxxxxx>
Date:        Thu Oct 15 11:13:08 2020 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxx>
Commit-Date: Sun Oct 18 07:57:49 2020 UTC

----------------------------------------------------------------------------

2 files changed, 4 insertions(+), 3 deletions(-)
src/add-ons/accelerants/matrox/GetDeviceInfo.c | 6 +++---
src/add-ons/accelerants/matrox/acc_std.h       | 1 +

----------------------------------------------------------------------------

diff --git a/src/add-ons/accelerants/matrox/GetDeviceInfo.c 
b/src/add-ons/accelerants/matrox/GetDeviceInfo.c
index 1d94a8c8ed..074d6450c2 100644
--- a/src/add-ons/accelerants/matrox/GetDeviceInfo.c
+++ b/src/add-ons/accelerants/matrox/GetDeviceInfo.c
@@ -15,9 +15,9 @@ status_t GET_ACCELERANT_DEVICE_INFO(accelerant_device_info * 
adi)
        /* no info on version is provided, so presumably this is for my info */
        adi->version = 1;
 
-       sprintf(adi->name, si->adi.name);
-       sprintf(adi->chipset, si->adi.chipset);
-       sprintf(adi->serial_no, "unknown");
+       strcpy(adi->name, si->adi.name);
+       strcpy(adi->chipset, si->adi.chipset);
+       strcpy(adi->serial_no, "unknown");
        adi->memory = (si->ps.memory_size * 1024 * 1024);
        adi->dac_speed = si->ps.max_dac1_clock;
 
diff --git a/src/add-ons/accelerants/matrox/acc_std.h 
b/src/add-ons/accelerants/matrox/acc_std.h
index 77b5963486..c544dca54a 100644
--- a/src/add-ons/accelerants/matrox/acc_std.h
+++ b/src/add-ons/accelerants/matrox/acc_std.h
@@ -7,6 +7,7 @@
 #define GLOBALDATA_H
 
 #include <stdio.h>
+#include <string.h>
 #include <sys/ioctl.h>
 #include "DriverInterface.h"
 #include "mga_globals.h"


Other related posts:

  • » [haiku-commits] haiku: hrev54661 - src/add-ons/accelerants/matrox - Adrien Destugues