X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Ftinfo%2Fwrite_entry.c;h=e1baf9e2325dc7474cb64aebd2d1b2998002c922;hb=768f77851c2350c02252b8e0e5d69fc435940b83;hp=cab4757019730a01838f1254aabe92f862267b9a;hpb=493e2f7b3fc309879f561a094fdfc15e5304b3d6;p=ncurses.git diff --git a/ncurses/tinfo/write_entry.c b/ncurses/tinfo/write_entry.c index cab47570..e1baf9e2 100644 --- a/ncurses/tinfo/write_entry.c +++ b/ncurses/tinfo/write_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2022 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -51,7 +51,7 @@ #define TRACE_NUM(n) /* nothing */ #endif -MODULE_ID("$Id: write_entry.c,v 1.118 2021/08/15 20:07:11 tom Exp $") +MODULE_ID("$Id: write_entry.c,v 1.120 2022/04/23 19:59:10 tom Exp $") static int total_written; static int total_parts; @@ -145,7 +145,7 @@ make_db_path(char *dst, const char *src, size_t limit) rc = 0; } } else { - if (strlen(top) + strlen(src) + 2 <= limit) { + if ((strlen(top) + strlen(src) + 6) <= limit) { _nc_SPRINTF(dst, _nc_SLIMIT(limit) "%s/%s", top, src); rc = 0; } @@ -248,7 +248,7 @@ _nc_set_writedir(const char *dir) || getcwd(actual, sizeof(actual)) == 0) _nc_err_abort("%s: not a directory", destination); #endif - _nc_keep_tic_dir(strdup(actual)); + _nc_keep_tic_dir(actual); } /*