[LTP] read_all: Fix buffer too small for long paths
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Mon Sep 7 16:58:29 CEST 2026
Hi Michael,
On Sep 7, 2026, Michael Menasherov wrote:
> read_all: Fix buffer too small for long paths
> +#define BUFFER_SIZE PATH_MAX
With the existing `if (++j >= BUFFER_SIZE - 1)` check, this still rejects a
valid PATH_MAX - 1-character pathname and reports TBROK before writing its
terminating NUL. A 4095-byte pathname reproduces this on PATH_MAX=4096; change
the queue_pop() bound so PATH_MAX - 1 characters fit.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list