Memleak and memory access error in sp_repr_css_merge_from_decl
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Medium
|
Kris |
Bug Description
This report is a follow up from Bug #1043571.
There is a memory leak in the function sp_repr_
----------
there is a piece of code that does not check that l>2 before using strncmp, which spammed the valgrind output
with 40 something invalid reads. It should be:
int l = strlen(
if (l>2 &&
)) {
units = g_strndup(
}
Also, please have mercy and don't use "l" for a variable, it is nearly indistinguishable from "1", especially if your eyes are as
bad as mine.
----------
Changed in inkscape: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Kris (kris-degussem) |
tags: | added: performance |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
Patch that should fix the described memory issues ...