- fixed a potential buffer overflow in geos plugin error reporting

- updated changelog for new logging system
This commit is contained in:
kunitoki 2012-04-10 10:24:53 +02:00
parent 1a203d3f85
commit 8f36d47a13
3 changed files with 10 additions and 3 deletions

View file

@ -9,6 +9,8 @@ For a complete change history, see the SVN log.
## Mapnik 2.1.0 ## Mapnik 2.1.0
- Improved logging/debugging system with release logs and file redirection (#937 and partially #986, #467)
- GDAL: allow setting nodata value on the fly (will override value if nodata is set in data) (#1161) - GDAL: allow setting nodata value on the fly (will override value if nodata is set in data) (#1161)
- GDAL: respect nodata for paletted/colormapped images (#1160) - GDAL: respect nodata for paletted/colormapped images (#1160)

View file

@ -65,24 +65,28 @@ DATASOURCE_PLUGIN(geos_datasource)
void geos_notice(const char* format, ...) void geos_notice(const char* format, ...)
{ {
#ifdef MAPNIK_LOG
char buffer[512]; char buffer[512];
va_list args; va_list args;
va_start(args, format); va_start(args, format);
vsprintf(buffer, format, args); vsnprintf(buffer, 512, format, args);
va_end(args); va_end(args);
MAPNIK_LOG_WARN(geos) << "geos_datasource: " << buffer; MAPNIK_LOG_WARN(geos) << "geos_datasource: " << buffer;
#endif
} }
void geos_error(const char* format, ...) void geos_error(const char* format, ...)
{ {
#ifdef MAPNIK_LOG
char buffer[512]; char buffer[512];
va_list args; va_list args;
va_start(args, format); va_start(args, format);
vsprintf(buffer, format, args); vsnprintf(buffer, 512, format, args);
va_end(args); va_end(args);
MAPNIK_LOG_ERROR(geos) << "geos_datasource: " << buffer; MAPNIK_LOG_ERROR(geos) << "geos_datasource: " << buffer;
#endif
} }

View file

@ -316,7 +316,8 @@ SOURCES += \
OTHER_FILES += \ OTHER_FILES += \
../SConstruct \ ../SConstruct \
../config.py ../config.py \
../CHANGELOG.md
include(agg.pri) include(agg.pri)
include(plugins.pri) include(plugins.pri)