Commit 35a02b7
authored
[extensions][wkb] Fix risk of undefined behavior when parsing a byte_order byte
* fixed risk of undefined behavior when parsing a byte_order byte
tried to parse a spatialite WKB blob with this code but the byte_order byte was replaced by a '69' token :
parsing this byte is successful but the value read is not part of the enum, the function returns true but the order parameter is left untouched.
Calls to that function elsewhere in the code do not initialise the order parameter.
see https://github.com/boostorg/geometry/blob/869e72fc01f2fce5ec3bcdfb91afab65ebd3ec6f/include/boost/geometry/extensions/multi/gis/io/wkb/detail/parser.hpp#L83
another option would be to return false in that case, but it didn't fit my need
* Update parser.hpp
typo fix1 parent 40aff06 commit 35a02b7
File tree
1 file changed
+2
-0
lines changed- include/boost/geometry/extensions/gis/io/wkb/detail
1 file changed
+2
-0
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
0 commit comments