diff options
author | Pablo Barciela <[email protected]> | 2019-04-04 10:30:22 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-07-19 23:32:53 +0200 |
commit | 23dcbd3168fc0aec25c018ffc1091f9440a38a95 (patch) | |
tree | bc6f93ceba570b5f2b759e94e70ad4b2ee4fd1b5 /eel | |
parent | 78b04ba42c5db504cefbc8746ac81a546bdf07fb (diff) | |
download | caja-23dcbd3168fc0aec25c018ffc1091f9440a38a95.tar.bz2 caja-23dcbd3168fc0aec25c018ffc1091f9440a38a95.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.c | 2 |
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; |