commit | fc7eb69b70a5704c861f09a7e8d25a01079e92c7 | [log] [tgz] |
---|---|---|
author | Benno Schulenberg <bensberg@justemail.net> | Wed Apr 06 10:41:42 2016 +0200 |
committer | Benno Schulenberg <bensberg@justemail.net> | Sun Apr 10 11:17:38 2016 +0200 |
tree | b4c075aa591e0ac81e6adc2fbf4d62dd4c029d07 | |
parent | 023fccb96661919eb1ede3342c8e3c460e62ff47 [diff] |
files: allocate enough space for the prompt when finding a lock file Instead of allocating a fixed amount of 128 bytes, which will overflow and segfault, adjust the allocation to the length of the file name, and if necessary trim the file name to make the prompt fit on the screen. This fixes https://savannah.gnu.org/bugs/?47511. Reported-by: Aapo Rantalainen <aapo.rantalainen@gmail.com> Signed-off-by: Benno Schulenberg <bensberg@justemail.net>