Revision: 4834
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4834&view=rev
Author: mdboom
Date: 2008-01-09 13:41:49 -0800 (Wed, 09 Jan 2008)
Log Message:
-----------
Fixed possible buffer overrun.
Modified Paths:
--------------
trunk/matplotlib/src/agg_py_path_iterator.h
Modified: trunk/matplotlib/src/agg_py_path_iterator.h
===================================================================
--- trunk/matplotlib/src/agg_py_path_iterator.h 2008-01-09 21:27:48 UTC (rev
4833)
+++ trunk/matplotlib/src/agg_py_path_iterator.h 2008-01-09 21:41:49 UTC (rev
4834)
@@ -43,7 +43,7 @@
Py_XDECREF(m_codes);
}
- static const char code_map[];
+ static const unsigned code_map[];
private:
inline unsigned vertex(unsigned idx, double* x, double* y)
@@ -66,7 +66,8 @@
{
if (m_iterator >= m_total_vertices) return agg::path_cmd_stop;
unsigned code = vertex(m_iterator++, x, y);
- while (MPL_isnan64(*x) || MPL_isnan64(*y)) {
+ while ((MPL_isnan64(*x) || MPL_isnan64(*y)) &&
+ m_iterator < m_total_vertices) {
vertex(m_iterator++, x, y);
code = agg::path_cmd_move_to;
}
@@ -90,7 +91,7 @@
};
// Maps path codes on the Python side to agg path commands
-const char PathIterator::code_map[] =
+const unsigned PathIterator::code_map[] =
{0,
agg::path_cmd_move_to,
agg::path_cmd_line_to,
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins