From dffaba364fb662064a71e6531610d2583f829e15 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Tue, 12 Nov 2024 13:14:57 +0000 Subject: Check the correct variable in cpuid(). --- src/lib/libcrypto/arch/amd64/crypto_cpu_caps.c | 4 ++-- src/lib/libcrypto/arch/i386/crypto_cpu_caps.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/arch/amd64/crypto_cpu_caps.c b/src/lib/libcrypto/arch/amd64/crypto_cpu_caps.c index b0da0d636c..6bb77411af 100644 --- a/src/lib/libcrypto/arch/amd64/crypto_cpu_caps.c +++ b/src/lib/libcrypto/arch/amd64/crypto_cpu_caps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto_cpu_caps.c,v 1.2 2024/10/19 13:06:11 jsing Exp $ */ +/* $OpenBSD: crypto_cpu_caps.c,v 1.3 2024/11/12 13:14:57 jsing Exp $ */ /* * Copyright (c) 2024 Joel Sing * @@ -43,7 +43,7 @@ cpuid(uint32_t eax, uint32_t *out_eax, uint32_t *out_ebx, uint32_t *out_ecx, *out_eax = eax; if (out_ebx != NULL) *out_ebx = ebx; - if (out_ebx != NULL) + if (out_ecx != NULL) *out_ecx = ecx; if (out_edx != NULL) *out_edx = edx; diff --git a/src/lib/libcrypto/arch/i386/crypto_cpu_caps.c b/src/lib/libcrypto/arch/i386/crypto_cpu_caps.c index b0da0d636c..6bb77411af 100644 --- a/src/lib/libcrypto/arch/i386/crypto_cpu_caps.c +++ b/src/lib/libcrypto/arch/i386/crypto_cpu_caps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto_cpu_caps.c,v 1.2 2024/10/19 13:06:11 jsing Exp $ */ +/* $OpenBSD: crypto_cpu_caps.c,v 1.3 2024/11/12 13:14:57 jsing Exp $ */ /* * Copyright (c) 2024 Joel Sing * @@ -43,7 +43,7 @@ cpuid(uint32_t eax, uint32_t *out_eax, uint32_t *out_ebx, uint32_t *out_ecx, *out_eax = eax; if (out_ebx != NULL) *out_ebx = ebx; - if (out_ebx != NULL) + if (out_ecx != NULL) *out_ecx = ecx; if (out_edx != NULL) *out_edx = edx; -- cgit v1.2.3-55-g6feb