Summary: | illegitimate use of setlocale(), atof() | ||
---|---|---|---|
Product: | poppler | Reporter: | Jakub Wilk <jwilk> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | jwilk |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Jakub Wilk
2009-08-01 06:39:58 UTC
any suggestion? The only portable and thread-safe solution I'm aware of is to replace atof() calls with calls to a custom function that does not use the C locale subsystem. Fixed, will be in next poppler version Thanks, that's much better. However, a race condition window is still there: If another thread called setlocale() with different decimal_separator between localeconv() and strtod() calls, you would get wrong results. I can live with that, if you app calls setlocale in between of it's execution it's doing weird things and you deserve to be punished. At most if you want we can try to put a warning somewhere of our not very extense documentation. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.