We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4636 - Fix missing field initialization in nanosvg styles struct
Summary: Fix missing field initialization in nanosvg styles struct
Status: RESOLVED FIXED
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.4
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-19 21:22 UTC by janisozaur
Modified: 2019-06-10 22:32 UTC (History)
1 user (show)

See Also:


Attachments
Initialize_all_the_SVG_style_fields.patch (871 bytes, patch)
2019-05-19 21:22 UTC, janisozaur
Details | Diff
bug-4636.svg (41 bytes, image/svg+xml)
2019-05-19 21:24 UTC, janisozaur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description janisozaur 2019-05-19 21:22:16 UTC
Created attachment 3785 [details]
Initialize_all_the_SVG_style_fields.patch

A malformed SVG file can lead to a path where style description is left unitialized and subsequently gets passed to free() in nsvg__deleteStyles.

Attached is the patch fixing the problem and a file showcasing the problem.
Comment 1 janisozaur 2019-05-19 21:24:02 UTC
Created attachment 3786 [details]
bug-4636.svg
Comment 2 Sam Lantinga 2019-06-10 22:32:35 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL_image/rev/93332afa1831