unsafe cast from char* to SPPattern

Bug #1378595 reported by Liam P. White on 2014-10-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description


1151| pat = pattern_getroot(SP_PATTERN(patid));

The variable 'patid' is a pointer to char. It has no vtable information. A cast to SPPattern would never work, and will probably crash.
I can't tell what was intended with this, or if it is actually correct.

Same line in trunk:

description: updated
Qantas94Heavy (qantas94heavy) wrote :

Still present in 0.92.x and master.

Changed in inkscape:
status: New → Triaged
milestone: none → 0.92.5
importance: Undecided → High
Changed in inkscape:
importance: High → Medium
Changed in inkscape:
assignee: nobody → Qantas94Heavy (qantas94heavy)
Qantas94Heavy (qantas94heavy) wrote :

Hi there, this doesn't seem to be right :)

I've made a pull request to GitLab, which should hopefully fix this issue: https://gitlab.com/inkscape/inkscape/merge_requests/676

Changed in inkscape:
status: Triaged → In Progress
Changed in inkscape:
status: In Progress → Fix Committed
milestone: 0.92.5 → 1.0
Qantas94Heavy (qantas94heavy) wrote :

Merged into master here: https://gitlab.com/inkscape/inkscape/commit/000a056a71115c2ad7a1a01bcfa7aa3b7c18f27d

Awaiting backport to 0.92.x.

(For master:)
Closed by: https://gitlab.com/Qantas94Heavy

tbnorth (terry-n-brown) on 2019-11-29
tags: added: bug-migration
Max Gaukler (mgmax) on 2020-05-09
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers