Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

osm2pgsql segfaults when readinga style file with more than MAX_STYLES styles #2086

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment

Comments

@openstreetmap-trac
Copy link

Reporter: avarab[at]gmail.com
[Submitted to the original trac issue database at 10.54pm, Monday, 20th July 2009]

osm2pgsql allocates a fixed amount of memory for reading a style file of unknown length, once it's past MAX_STYLES (currently 1000) it'll start writing into unallocated memory & segfault.

It should be changed to malloc/realloc as required.

See [16573] for the 100 -> 1000 workaround.

@openstreetmap-trac
Copy link
Author

Author: pnorman
[Added to the original trac issue at 10.14am, Tuesday, 3rd January 2017]

I remember fixing a lot of these types of problems with the C++ conversion, and MAX_STYLES is no longer in the code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant