37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
|
From 6efee1997c468150f472941f0f183fc054b436a4 Mon Sep 17 00:00:00 2001
|
||
|
From: unknown <Falcosc@users.noreply.github.com>
|
||
|
Date: Sat, 27 Feb 2021 01:26:18 +0100
|
||
|
Subject: [PATCH] fix Heap corruption
|
||
|
|
||
|
---
|
||
|
lib/nb_smu_ops.c | 2 +-
|
||
|
lib/ryzenadj.h | 2 +-
|
||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/lib/nb_smu_ops.c b/lib/nb_smu_ops.c
|
||
|
index 965264c..2c31b48 100644
|
||
|
--- a/lib/nb_smu_ops.c
|
||
|
+++ b/lib/nb_smu_ops.c
|
||
|
@@ -45,7 +45,7 @@ smu_t get_smu(nb_t nb, int smu_type) {
|
||
|
uint32_t rep; /* REP of test message */
|
||
|
smu_service_args_t arg = {0, 0, 0, 0, 0, 0}; /* Test message shuld have no arguments */
|
||
|
|
||
|
- smu = (smu_t)malloc((sizeof(smu_t)));
|
||
|
+ smu = (smu_t)malloc((sizeof(*smu)));
|
||
|
smu->nb = nb;
|
||
|
/* Fill SMU information */
|
||
|
switch(smu_type){
|
||
|
diff --git a/lib/ryzenadj.h b/lib/ryzenadj.h
|
||
|
index 6f18ade..90c94ee 100644
|
||
|
--- a/lib/ryzenadj.h
|
||
|
+++ b/lib/ryzenadj.h
|
||
|
@@ -10,7 +10,7 @@ extern "C" {
|
||
|
|
||
|
#define RYZENADJ_REVISION_VER 0
|
||
|
#define RYZENADJ_MAJOR_VER 7
|
||
|
-#define RYZENADJ_MINIOR_VER 0
|
||
|
+#define RYZENADJ_MINIOR_VER 1
|
||
|
|
||
|
enum ryzen_family {
|
||
|
FAM_UNKNOWN = -1,
|