Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/826474a1a3707bb837bb1b1aa687d4981acd914d
...commit
http://git.netsurf-browser.org/netsurf.git/commit/826474a1a3707bb837bb1b1aa687d4981acd914d
...tree
http://git.netsurf-browser.org/netsurf.git/tree/826474a1a3707bb837bb1b1aa687d4981acd914d
The branch, master has been updated
via 826474a1a3707bb837bb1b1aa687d4981acd914d (commit)
from 13a7004e6b152494eeab677774cdb626b9e1541d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=826474a1a3707bb837bb1b1aa687d4981acd914d
commit 826474a1a3707bb837bb1b1aa687d4981acd914d
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>
use memcpy instead of strcpy to make the dom string copy intention explicit
diff --git a/content/handlers/html/imagemap.c b/content/handlers/html/imagemap.c
index d26ba5f..0c35768 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;
}
-----------------------------------------------------------------------
Summary of changes:
content/handlers/html/imagemap.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/content/handlers/html/imagemap.c b/content/handlers/html/imagemap.c
index d26ba5f..0c35768 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;
}
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org