diff options
author | Pablo Barciela <[email protected]> | 2019-04-04 10:30:22 +0200 |
---|---|---|
committer | monsta <[email protected]> | 2019-07-23 16:33:27 +0300 |
commit | fbdab96b5913c8aa7117e3dbee07efc42eea00c1 (patch) | |
tree | f026cda412c0d03c51e1388d8711e5101ca69026 | |
parent | 6ec797480806fae394d0ff086cf3923655fd7bdd (diff) | |
download | caja-fbdab96b5913c8aa7117e3dbee07efc42eea00c1.tar.bz2 caja-fbdab96b5913c8aa7117e3dbee07efc42eea00c1.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.
-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; |