talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit ab24ae5d5022c744620046c1ab25c898d45ef507
parent a8e2db54e2828e3dc4e45f97af36bf0ef2bb902a
Author: Ricardo Mones <ricardo@mones.org>
Date:   Thu, 18 Jun 2015 02:15:12 +0200

Remove unchecked realloc which is unnecessary

Diffstat:
Msrc/plugins/archive/archiver_gtk.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/plugins/archive/archiver_gtk.c b/src/plugins/archive/archiver_gtk.c @@ -347,10 +347,8 @@ static gchar* descriptive_file_name( /* ensure file name is not larger than 96 chars (max file name size * is 100 chars but reserve for .md5) */ - if (strlen(name) > 96) { - name = realloc(name, 97); + if (strlen(name) > 96) name[96] = 0; - } new_file = g_strconcat(p, "/", name, NULL);