diff options
author | John Zaitseff <J.Zaitseff@zap.org.au> | 2008-01-01 02:53:21 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2008-01-01 02:54:19 +0200 |
commit | 1f5782739a395cff085b9d246eb47b866fee1f22 (patch) | |
tree | 3ba41c351024c7610e50ce0ba7142e8975d09b3f /dselect/baselist.cc | |
parent | c6670c91196ecf5e36c707ab7f3d7cf3da8fb025 (diff) | |
download | dpkg-1f5782739a395cff085b9d246eb47b866fee1f22.tar.gz |
dselect: Do not loop endlessly with very long package descriptions
Closes: #179320, #342495
Diffstat (limited to 'dselect/baselist.cc')
-rw-r--r-- | dselect/baselist.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dselect/baselist.cc b/dselect/baselist.cc index fd6bcdc69..8ba7ff02a 100644 --- a/dselect/baselist.cc +++ b/dselect/baselist.cc @@ -365,6 +365,11 @@ void baselist::wordwrapinfo(int offset, const char *m) { wrapping= 1; } if (!p) break; + if (getcury(infopad) == (MAX_DISPLAY_INFO - 1)) { + waddstr(infopad, + "[The package description is too long and has been truncated...]"); + break; + } m= ++p; } if (debug) fprintf(debug,"baselist[%p]::wordwrapinfo() done\n",this); |