1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-11-10 22:59:13 +00:00

Fix null pointer dereference in cpuid_deserialize_raw_data_internal

This commit is contained in:
Umio Yasuno 2022-09-20 16:32:54 +09:00 committed by Xorg
parent b1732e4785
commit 2ec692b579

View file

@ -437,9 +437,11 @@ static int cpuid_deserialize_raw_data_internal(struct cpu_raw_data_t* single_raw
}
if (i >= 0) {
debugf(2, "Parsing RAW dump for a single CPU dump\n");
cpuid_grow_raw_data_array(raw_array, 1);
raw_ptr = &raw_array->raw[0];
raw_array->with_affinity = false;
if (use_raw_array) {
cpuid_grow_raw_data_array(raw_array, 1);
raw_ptr = &raw_array->raw[0];
raw_array->with_affinity = false;
}
}
}
else if (!strcmp(line, "------[ Versions ]------") || !strcmp(line, "------[ Logical CPU #0 ]------") || !strcmp(line, "------[ CPUID Registers / Logical CPU #0 ]------")) {