Fixes in the memcached, RADOS, composite and HTTP-proxy storage backends (split out of #497 as suggested there, plus two bugs found later).
- Unchecked `malloc` results, a NULL dereference when `strstr()` finds no separator in `store_ro_composite`, and leaks on error paths in all four backends. - **`store_memcached`**: tile expiry passed an uninitialised CAS token to `memcached_cas()`, so it almost always failed; now uses `memcached_replace()`. - **`store_ro_http_proxy`**: a 404 freed the cached tile without clearing the pointer (double free on the next fetch) and leaked the response body; responses other than 200/404 served the previous tile for the new coordinates; unbounded `strcpy` of the map name. 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/504 -- Commit Summary -- * storage backends: check malloc results, fix NULL dereferences and leaks * storage backends: fix memcached expiry and HTTP proxy cache bugs -- File Changes -- M src/store_memcached.c (12) M src/store_rados.c (12) M src/store_ro_composite.c (39) M src/store_ro_http_proxy.c (27) -- Patch Links -- https://github.com/openstreetmap/mod_tile/pull/504.patch https://github.com/openstreetmap/mod_tile/pull/504.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/mod_tile/pull/504 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
