[gthumb] removed useless and potentially dangerous strncpy
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] removed useless and potentially dangerous strncpy
- Date: Mon, 26 Mar 2012 18:38:55 +0000 (UTC)
commit d9a97b9cd0980430e4cf1f89cad1ae03008e03c7
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Mar 26 20:36:13 2012 +0200
removed useless and potentially dangerous strncpy
[bug #672866]
gthumb/gth-file-properties.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gthumb/gth-file-properties.c b/gthumb/gth-file-properties.c
index a6bed3a..f3a55ae 100644
--- a/gthumb/gth-file-properties.c
+++ b/gthumb/gth-file-properties.c
@@ -137,11 +137,8 @@ gth_file_properties_real_set_file (GthPropertyView *base,
if (value != NULL) {
char *tmp_value;
- if (g_utf8_strlen (value, -1) > MAX_ATTRIBUTE_LENGTH) {
- g_utf8_strncpy (value, value, MAX_ATTRIBUTE_LENGTH - 3);
+ if (g_utf8_strlen (value, -1) > MAX_ATTRIBUTE_LENGTH)
g_utf8_strncpy (g_utf8_offset_to_pointer (value, MAX_ATTRIBUTE_LENGTH - 3), "...", 3);
- }
-
tmp_value = _g_utf8_replace (value, "[\r\n]", " ");
g_free (value);
value = tmp_value;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]