1 Commits

Author SHA1 Message Date
Xavier Roche
106d34d82c fix: size the lock-file path buffer to the concat buffer (closes #183)
A long log path made the lock-file path overflow the fixed 256-byte n_lock
buffer, tripping the guarded copy and aborting with signal 6. Size n_lock to
the concat-buffer capacity so it holds any path fconcat can produce.

(cherry picked from commit 15144ffd24667712cca2ac0fee96bd355239eff6)
2026-06-12 23:24:20 +02:00

View File

@@ -2899,7 +2899,9 @@ static int hts_main_internal(int argc, char **argv, httrackp * opt) {
}
{
char n_lock[256];
/* Sized to the concat-buffer capacity so it can always hold the lock-file
path produced by fconcat(), even with a long log path (issue #183). */
char n_lock[OPT_GET_BUFF_SIZE(opt)];
// on peut pas avoir un affichage ET un fichier log
// ca sera pour la version 2