**Format-string bug in `g_logger()`**: the fully formatted message was passed to `syslog()` as its *format* argument, so any `%` in logged data — tile paths, map names and other values that can come from requests — was interpreted by syslog (undefined behaviour; can crash or leak memory contents) when renderd runs in the background. Now uses `"%s"`.
`g_logger()` is also declared with `G_GNUC_PRINTF`, so the compiler checks every call. That found a `double` printed with `%d` (UB) in `render_submit_queue`, two calls with surplus arguments, and tests passing messages as the format string; all fixed here. Independent of the other PRs in this series; it applies to `master` on its own and merges cleanly with each of them in any order. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01YForD7qSL9LT6FhMuAoKPV You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/mod_tile/pull/505 -- Commit Summary -- * g_logger: stop passing log messages to syslog() as the format string -- File Changes -- M includes/g_logger.h (2) M src/g_logger.c (14) M src/render_submit_queue.c (2) M src/store.c (2) M src/store_ro_http_proxy.c (2) M tests/gen_tile_test.cpp (4) -- Patch Links -- https://github.com/openstreetmap/mod_tile/pull/505.patch https://github.com/openstreetmap/mod_tile/pull/505.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/mod_tile/pull/505 You are receiving this because you are subscribed to this thread. Message ID: <openstreetmap/mod_tile/pull/[email protected]>
_______________________________________________ Tile-serving mailing list [email protected] https://lists.openstreetmap.org/listinfo/tile-serving
