Project

General

Profile

Bug #2815

race condition during file-magic initialization

Added by magen bluten 4 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Affected Versions:
Effort:
Difficulty:

Description

the function `magic_open()` initializes a static global table (c array) without locking. thus, there is a race condition if multiple threads call `magic_open` in parallel. the corresponding source in the `file` repository is (in function `init_file_tables`);

https://git.in-ulm.de/cbiedl/file/src/master/src/apprentice.c#L389

not sure how the init sequence works in suri. so this could also be a non-issue.

Also available in: Atom PDF