agg: avoid writting beyond the array size
Potentially trying to add two new items to an array without enough room left. CID 991455
This commit is contained in:
@@ -54,7 +54,7 @@ namespace agg
|
|||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
void vcgen_dash::add_dash(double dash_len, double gap_len)
|
void vcgen_dash::add_dash(double dash_len, double gap_len)
|
||||||
{
|
{
|
||||||
if(m_num_dashes < max_dashes)
|
if(m_num_dashes < max_dashes - 1)
|
||||||
{
|
{
|
||||||
m_total_dash_len += dash_len + gap_len;
|
m_total_dash_len += dash_len + gap_len;
|
||||||
m_dashes[m_num_dashes++] = dash_len;
|
m_dashes[m_num_dashes++] = dash_len;
|
||||||
|
|||||||
Reference in New Issue
Block a user