diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2014-08-25 00:34:35 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2014-08-25 00:34:35 -0400 |
commit | b363dfc27473c2ee3c1ccc286115b238030d85f0 (patch) | |
tree | 9fbffaf5eb48b2a8021cfd4bba25704fc339d10f /src | |
parent | cbe90040d54b4a8855e1b0e4355676816a4e1fd3 (diff) | |
download | lynx-snapshots-b363dfc27473c2ee3c1ccc286115b238030d85f0.tar.gz |
snapshot of project "lynx", label v2-8-9dev_1c
Diffstat (limited to 'src')
-rw-r--r-- | src/LYPrint.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/LYPrint.c b/src/LYPrint.c index f3bbd235..9149956e 100644 --- a/src/LYPrint.c +++ b/src/LYPrint.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYPrint.c,v 1.104 2014/02/04 01:58:51 tom Exp $ + * $LynxId: LYPrint.c,v 1.105 2014/08/24 10:41:17 tom Exp $ */ #include <HTUtils.h> #include <HTAccess.h> @@ -140,7 +140,14 @@ static void SetupFilename(bstring **filename, char *cp; BStrCopy0(*filename, sug_filename); /* add suggestion info */ - BStrAlloc(*filename, LY_MAXPATH); /* FIXME */ + /* + * FIXME: the history-recall still uses fixed-size buffers + */ + if ((*filename)->len >= LY_MAXPATH) { + (*filename)->str[LY_MAXPATH - 1] = '\0'; + } else { + BStrAlloc(*filename, LY_MAXPATH); + } change_sug_filename((*filename)->str); if (!(HTisDocumentSource()) && (cp = strrchr((*filename)->str, '.')) != NULL) { |