blob: 524b1e6cae8db065d09eca419658b6633974ea3f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
--- misc/libvisio-0.0.17/src/lib/VSDXContentCollector.cpp 2012-05-31 15:14:42.000000000 +0200
+++ misc/build/libvisio-0.0.17/src/lib/VSDXContentCollector.cpp 2012-06-09 00:08:24.139051461 +0200
@@ -1429,7 +1429,10 @@ void libvisio::VSDXContentCollector::collectNURBSTo(unsigned /* id */, unsigned
// Fill in end knots
while (knotVector.size() < (controlPoints.size() + degree + 2))
- knotVector.push_back(knotVector.back());
+ {
+ double tmpBack = knotVector.back();
+ knotVector.push_back(tmpBack);
+ }
// Convert control points to static co-ordinates
for (std::vector<std::pair<double, double> >::iterator it = controlPoints.begin();
@@ -2059,7 +2062,11 @@
void libvisio::VSDXContentCollector::_convertDataToString(WPXString &result, const WPXBinaryData &data, TextFormat format)
{
+ if (!data.size())
+ return;
WPXInputStream *pStream = const_cast<WPXInputStream *>(data.getDataStream());
+ if (!pStream)
+ return;
if (format == VSD_TEXT_ANSI)
{
while (!pStream->atEOS())
@@ -2312,6 +2312,8 @@ void libvisio::VSDXContentCollector::endPages(const std::vector<unsigned> &pageO
void libvisio::VSDXContentCollector::_appendUTF16LE(WPXString &text, WPXInputStream *input)
{
+ if (!input)
+ return;
while (!input->atEOS())
{
uint16_t high_surrogate = 0;
|