Files
Natalia Portillo bbae748612 Fix data race in StuffIt X English dictionary initialization
The shared English word dictionary was built behind a plain `if(dict_ptrs)`
guard, which provides neither mutual exclusion nor memory ordering. Worse,
dict_ptrs was published by malloc before the pointer table was populated, so a
concurrent caller of the exported AARU_stuffitx_english_decode_buffer could
pass the guard and read uninitialized pointers. Two racing threads would also
both run the full PPMd decode, leaking the dictionary buffer.

Build the dictionary in locals and publish the statics only once the table is
complete, driven by pthread_once (POSIX) or InitOnceExecuteOnce (Windows), and
record the outcome so a failed build is never retried.

Also fix three adjacent issues in the same path: the word-scan loop
dereferenced p before bounds-checking it, the base-52 index accumulator could
overflow into a value that passed the bounds check, and the word buffer clamp
left no room for the appended terminator character.

Same class of bug as MacPaw/XADMaster#194.
2026-08-31 12:06:34 +01:00
..
2026-04-17 01:19:44 +01:00
2026-04-17 01:19:44 +01:00
2026-04-17 01:19:44 +01:00
2026-04-17 01:19:44 +01:00
2026-04-17 01:19:44 +01:00
2026-04-17 01:19:44 +01:00
2026-04-17 01:19:44 +01:00
2026-04-17 01:19:44 +01:00
2026-04-17 01:19:44 +01:00
2026-04-17 01:19:44 +01:00
2026-04-17 01:19:44 +01:00
2026-04-17 01:19:44 +01:00
2026-04-17 01:19:44 +01:00
2026-04-17 01:19:44 +01:00