Commit Graph

137 Commits (0985b6646bbc77aeff00e6f15b6edda9b5830221)

Author SHA1 Message Date
tamasmeszaros 0985b6646b Remove redundant line 2022-05-04 14:39:07 +02:00
tamasmeszaros c995d1026e Fix linking on MSVC 2022-05-04 14:22:14 +02:00
tamasmeszaros b21ebe01b8 Add CMake build script to the project
Also add short description into readme
2022-05-04 09:33:58 +02:00
Mikko Mononen 214cf85efc
Merge pull request #205 from AuthorityFX/master
Fixed rbg percentage parsing in nsvg__parseColorRGB
2022-04-08 00:57:43 +03:00
Ryan P. Wilson a5486fa30d roundf instead of round
move declaration of rgb floats to top of block
2022-04-07 14:40:00 -04:00
Ryan P. Wilson c3ad36ef81 Fixed rbg percentage parsing in nsvg__parseColorRGB 2022-04-06 21:47:26 -04:00
Mikko Mononen ccdb199513
Merge pull request #198 from ctrlcctrlv/CVE_2019_1000032
Fix decimal values in color fields (nsvg__parseColorRGB, nsvg__parseColorHex)
2021-09-03 21:24:42 +03:00
Greg Ercolano 419782d3d1 Fix decimal values in color fields (nsvg__parseColorRGB)
Closes #136, fixes [CVE-2019-1000032](https://0day.work/cve-2019-1000032-memory-corruption-in-nanosvg/).
2021-09-03 07:10:23 -04:00
Mikko Mononen 3cdd4a9d78
Merge pull request #196 from oehhar/master
Fix for ticket #179 "division by 0" proposed by SergeySlice
2021-03-30 23:20:21 +03:00
Harald Oehlmann 44e5e4c765 Fix for ticket #179 "division by 0" proposed by SergeySlice 2021-03-29 13:19:14 +02:00
Mikko Mononen 3e403ec72a
Merge pull request #189 from fvogelnew1/Fix-for-#188
Update nanosvg.h
2020-11-20 12:53:11 +02:00
fvogelnew1 45eb9f8bcc
Update nanosvg.h
Fix https://github.com/memononen/nanosvg/issues/188
2020-11-19 22:20:57 +01:00
Mikko Mononen cc6c08d3a8 Restore example2 test file 2020-09-28 22:00:06 +03:00
Mikko Mononen ddd39e9669 Fix for #185
- prevent infinite loop when gradient ID is left to empty string
- prevent infinite loop when gradient references to self
- lookup up to 32 references back
2020-09-28 10:49:46 +03:00
Mikko Mononen e7f5981b1e Fix for #178
- make sure nsvg__addPath() hands only valid number of pointts (1+N*3)
- require moveTo path command before handling other commands
- require (sign+)digit for a valid path command coordinate
- allow to add bezier segment only after there’s at leat one point (now
also consistent with nsvg__lineTo)
2020-09-28 10:35:41 +03:00
Mikko Mononen 07a5e2a33c
Merge pull request #182 from oehhar/master
Ticket #178: endless loop (DOS) when parsing crafted input via nsvgPa…
2020-09-21 20:57:26 +03:00
Harald Oehlmann dac455fd94 Ticket #178: endless loop (DOS) when parsing crafted input via nsvgParseFromFile()
Fix be fvogel
2020-09-21 13:53:54 +02:00
Mikko Mononen 25241c5a8f
Update README.md 2019-04-22 21:57:37 +03:00
Mikko Mononen 3e2a632c29
Merge pull request #152 from darealshinji/patch-2
don't cast long long -> double -> long long
2019-04-05 14:01:47 +03:00
Mikko Mononen 7cd94e3191
Merge pull request #154 from jzrake/master
Fix parsing of numbers with units ex and em
2019-03-08 22:33:32 +02:00
Jonathan Zrake dc46f954b6 Fix parsing of numbers with units ex and em
Unrelated: kill precision warning in nsvg__atof, make expPart long.
2019-03-08 14:17:16 -05:00
darealshinji 8c360e4214
don't cast long long -> double -> long long 2019-03-05 17:19:28 +01:00
Mikko Mononen c1f6e209c1
Merge pull request #145 from wcout/issue_139
Fix issue #139: Nano SVG is still locale dependent
2018-12-14 22:22:57 +02:00
wcout 78e7627d10 Fix issue #139: Nano SVG is still locale dependent 2018-12-14 20:02:31 +01:00
Mikko Mononen 2b08deeb55
Merge pull request #128 from poke1024/cpluscplus
Add option for cpp symbol export
2018-08-08 10:38:26 +03:00
Bernhard Liebl 773d84acaf Add option for cpp symbol export 2018-08-08 07:21:54 +02:00
Mikko Mononen 35a45f3396 Merge branch 'pr/63' 2018-07-22 23:08:43 +03:00
Mikko Mononen 06c1f0f3bb
Merge pull request #116 from porglezomp-misc/master
Parse <svg> percentage width for automatic sizing
2018-04-14 06:50:42 +03:00
Caleb Jones d6eabf29c9 Parse <svg> percentage width for automatic sizing
Instead of calculating percentage coordinates relative to 1px, we calculate them
relative to 0px width, that way an explicit <svg width="100%"> will be converted
to <svg width="0px"> and trigger the bounding-box sizing calculation.
2018-04-13 19:57:06 -04:00
Mikko Mononen 1f17a7ecea
Merge pull request #113 from martinlindhe/master
type fix: change nsvg__parseLineJoin() default value to NSVG_JOIN_MITER
2018-03-16 23:17:31 +02:00
Martin Lindhe 19bf258060 type fix: change nsvg__parseLineJoin() default value to NSVG_JOIN_MITER 2018-03-16 15:05:04 +01:00
Mikko Mononen b0be83ba62
Merge pull request #112 from luzpaz/misc-typo
Misc. README typo
2018-02-12 19:37:21 +02:00
luz.paz 00574a8157 Misc. README typo 2018-02-12 10:51:16 -05:00
Mikko Mononen 9a74da4db5 Merge pull request #99 from nightlark/patch-1
Added missing 'S' in NanoSVG
2017-07-09 11:46:20 +03:00
Ryan Mast 1859f6a5f5 Added missing 'S' in NanoSVG 2017-07-08 22:51:23 -07:00
Mikko Mononen 47697e1414 Fixed how sign is applied for fractions 2017-07-01 18:07:55 +03:00
Mikko Mononen 9b51689812 Fix for issue #90 - use custom strong to float conversion
Use custom strong to float conversion instead of the one from std
library to fix parsing floats with locales which use different number
format than specified by SVG.
2017-06-30 18:16:26 +03:00
Mikko Mononen e41d60761f Merge pull request #92 from X-Ryl669/current
Fix for gradient transformation when scaling is used
2017-06-13 21:20:35 +03:00
X-Ryl669 17aa37f0c4 Fix for gradient transformation when scaling is used 2017-06-13 15:46:05 +02:00
Mikko Mononen 5ec585ce1a Merge pull request #89 from X-Ryl669/master
Fix for wrong computation in ArcTo function
2017-06-01 20:33:56 +03:00
X-Ryl669 7a9b4005c0 Fix for wrong computation in ArcTo function 2017-06-01 11:35:03 +02:00
Mikko Mononen 226e370e1d Merge pull request #84 from Djack1010/pull-request
Fix two errors found with AFL
2017-04-27 20:59:38 +03:00
djack1010 a53bdc7512 Revert wrong comment 2017-04-25 11:12:41 +02:00
djack1010 41dcaefdd0 Applied requested changes 2017-04-24 11:41:21 +02:00
djack1010 fe14c0386c Ignore malformed attributes in XML 2017-04-22 23:45:24 +02:00
djack1010 4310325aba Check buffer length in parseCoordinateRaw 2017-04-22 23:41:19 +02:00
Mikko Mononen b20e2eb968 Merge pull request #83 from daniel-starke/master
Fix for typos, GCC warnings and shape ordering
2017-04-22 08:15:50 +03:00
Mikko Mononen aeba90c947 Merge branch 'master' into master 2017-04-22 08:14:59 +03:00
Mikko Mononen ac14b32af1 Merge pull request #82 from lieff/master
fix shapes order
2017-04-22 08:10:42 +03:00
daniel-starke 096f60a5c5 Changed reverse shape list to tail cached variant 2017-04-21 22:05:26 +02:00