Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 23e6cf5

Browse filesBrowse files
committed
Return error on unknown code
1 parent cc41bff commit 23e6cf5
Copy full SHA for 23e6cf5

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎src/_path.h

Copy file name to clipboardExpand all lines: src/_path.h
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ int __convert_to_string(PathIterator &path,
995995
while ((code = path.vertex(&x[0], &y[0])) != agg::path_cmd_stop) {
996996
if (code == 0x4f) {
997997
if ((p = __append_to_string(p, buffer, *buffersize, codes[4])) == NULL) return 1;
998-
} else {
998+
} else if (code < 5) {
999999
size = sizes[code - 1];
10001000

10011001
for (int i = 1; i < size; ++i) {
@@ -1052,6 +1052,9 @@ int __convert_to_string(PathIterator &path,
10521052

10531053
last_x = x[size - 1];
10541054
last_y = y[size - 1];
1055+
} else {
1056+
// Unknown code value
1057+
return 2;
10551058
}
10561059

10571060
if ((p = __append_to_string(p, buffer, *buffersize, "\n")) == NULL) return 1;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.