diff options
author | Marat Dukhan <maratek@gmail.com> | 2018-02-20 01:31:23 -0500 |
---|---|---|
committer | Marat Dukhan <maratek@gmail.com> | 2018-02-20 01:31:23 -0500 |
commit | a9e55a6afde89722af7ee30dc7bd27435e96226b (patch) | |
tree | 2203f0a02b985ab99265aaf140c3e6748789148d /src | |
parent | d72e1ce119a357eaec22e1ea7b146d789f61b827 (diff) | |
download | cpuinfo-a9e55a6afde89722af7ee30dc7bd27435e96226b.tar.gz |
Fix uninitialized memory bug on macOS
Diffstat (limited to 'src')
-rw-r--r-- | src/x86/mach/init.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/x86/mach/init.c b/src/x86/mach/init.c index 75404f1..db162e1 100644 --- a/src/x86/mach/init.c +++ b/src/x86/mach/init.c @@ -48,6 +48,7 @@ void cpuinfo_x86_mach_init(void) { } struct cpuinfo_x86_processor x86_processor; + memset(&x86_processor, 0, sizeof(x86_processor)); cpuinfo_x86_init_processor(&x86_processor); const uint32_t threads_per_core = mach_topology.threads / mach_topology.cores; |