X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fwrite_entry.c;fp=ncurses%2Ftinfo%2Fwrite_entry.c;h=f55686fe11c1b9a1a422fc077903418198e86f08;hp=cc3f83ac6a6cc57a0f584a5a41bfdfc573189f32;hb=d545d5dd9889756f005fb63a843adb230b990493;hpb=79695a2ff354087dca5006351286f741ee8c82c4 diff --git a/ncurses/tinfo/write_entry.c b/ncurses/tinfo/write_entry.c index cc3f83ac..f55686fe 100644 --- a/ncurses/tinfo/write_entry.c +++ b/ncurses/tinfo/write_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2015,2017 Free Software Foundation, Inc. * + * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -50,7 +50,7 @@ #define TRACE_NUM(n) /* nothing */ #endif -MODULE_ID("$Id: write_entry.c,v 1.101 2017/11/25 19:56:06 tom Exp $") +MODULE_ID("$Id: write_entry.c,v 1.102 2018/02/11 20:24:28 Julien.Cristau Exp $") static int total_written; static int total_parts; @@ -377,7 +377,7 @@ _nc_write_entry(TERMTYPE2 *const tp) start_time = 0; } - if (strlen(first_name) >= sizeof(filename) - (2 + LEAF_LEN)) { + if (strlen(first_name) >= limit2) { _nc_warning("terminal name too long."); saved = first_name[limit2]; first_name[limit2] = '\0';