summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-04-04 10:30:22 +0200
committerlukefromdc <[email protected]>2019-04-12 02:44:14 +0000
commit7f96149e64ec03c6e63ee1ee6d486e5bdbf88445 (patch)
tree64968ac8c9099612404282754527d01e9edeee78 /eel
parentf7c7f7f6bc7dbcf0bc25c158a278710e8a0c5dfe (diff)
downloadcaja-7f96149e64ec03c6e63ee1ee6d486e5bdbf88445.tar.bz2
caja-7f96149e64ec03c6e63ee1ee6d486e5bdbf88445.tar.xz
eel-editable-label: Use 'memmove' instead of 'memcpy'
Fixes 'flawfinder' warning: (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data.
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-editable-label.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index 7dce4802..0fbdc0c5 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -2320,7 +2320,7 @@ eel_editable_label_insert_text (EelEditableLabel *label,
g_object_freeze_notify (G_OBJECT (label));
memmove (label->text + *index + new_text_length, label->text + *index, label->n_bytes - *index);
- memcpy (label->text + *index, new_text, new_text_length);
+ memmove (label->text + *index, new_text, new_text_length);
label->n_bytes += new_text_length;