diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2019-03-15 18:19:28 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2019-03-15 18:19:28 +0000 |
commit | 155c0c568f56012b624ae7000200e6f2d270ce50 (patch) | |
tree | e0832eb050d14406d4eb815086a4af97164be8bb /content | |
parent | f70c0fa6266a2d7afae95c43e6c96c00033944e5 (diff) | |
parent | 446fd392e85fa8ac527c2e1938889ea0781cca6d (diff) | |
download | netsurf-155c0c568f56012b624ae7000200e6f2d270ce50.tar.gz netsurf-155c0c568f56012b624ae7000200e6f2d270ce50.tar.bz2 |
Merge branch 'master' of git://git.netsurf-browser.org/netsurf into chris/amissl
Diffstat (limited to 'content')
-rw-r--r-- | content/handlers/html/imagemap.c | 8 | ||||
-rw-r--r-- | content/handlers/image/svg.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/content/handlers/html/imagemap.c b/content/handlers/html/imagemap.c index d26ba5f4d..0c3576842 100644 --- a/content/handlers/html/imagemap.c +++ b/content/handlers/html/imagemap.c @@ -376,14 +376,14 @@ imagemap_addtolist(const struct html_content *c, } if (target != NULL) { - /* Copy target into the map */ + /* Copy target dom string into the map data */ new_map->target = malloc(dom_string_byte_length(target) + 1); if (new_map->target == NULL) goto bad_out; - strncpy(new_map->target, - dom_string_data(target), - dom_string_byte_length(target)); + memcpy(new_map->target, + dom_string_data(target), + dom_string_byte_length(target)); new_map->target[dom_string_byte_length(target)] = 0; } diff --git a/content/handlers/image/svg.c b/content/handlers/image/svg.c index 51260733d..99722495f 100644 --- a/content/handlers/image/svg.c +++ b/content/handlers/image/svg.c @@ -189,7 +189,7 @@ svg_redraw_internal(struct content *c, for (i = 0; i != diagram->shape_count; i++) { if (diagram->shape[i].path) { pstyle.stroke_width = plot_style_int_to_fixed( - diagram->shape[i].stroke); + diagram->shape[i].stroke_width); pstyle.stroke_colour = BGR(diagram->shape[i].stroke); pstyle.fill_colour = BGR(diagram->shape[i].fill); res = ctx->plot->path(ctx, |