Skip to content

Commit 84818a4

Browse files
Fix buffer size for reading processor core id (#352)
1 parent f9a0324 commit 84818a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/linux/processors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ uint32_t cpuinfo_linux_get_processor_min_frequency(uint32_t processor) {
231231
}
232232

233233
bool cpuinfo_linux_get_processor_core_id(uint32_t processor, uint32_t core_id_ptr[restrict static 1]) {
234-
char core_id_filename[PACKAGE_ID_FILENAME_SIZE];
234+
char core_id_filename[CORE_ID_FILENAME_SIZE];
235235
const int chars_formatted =
236236
snprintf(core_id_filename, CORE_ID_FILENAME_SIZE, CORE_ID_FILENAME_FORMAT, processor);
237237
if ((unsigned int)chars_formatted >= CORE_ID_FILENAME_SIZE) {

0 commit comments

Comments
 (0)