mirror of
https://github.com/anrieff/libcpuid
synced 2025-06-07 00:51:40 +00:00
Return ERR_BADFMT from cpuid_deserialize_raw_data_internal() if length is 0
This commit is contained in:
parent
933f9cccb6
commit
8015f7016c
1 changed files with 1 additions and 1 deletions
|
@ -937,7 +937,7 @@ static int cpuid_deserialize_raw_data_internal(struct cpu_raw_data_t* single_raw
|
|||
/* Close file descriptor */
|
||||
if (strcmp(filename, ""))
|
||||
fclose(f);
|
||||
return cpuid_set_error(ERR_OK);
|
||||
return cpuid_set_error((use_raw_array && (raw_array->num_raw == 0)) ? ERR_BADFMT : ERR_OK);
|
||||
}
|
||||
#undef RAW_ASSIGN_LINE_X86
|
||||
#undef RAW_ASSIGN_LINE_ARM
|
||||
|
|
Loading…
Add table
Reference in a new issue