ptp: prevent string overflow
The ida_alloc_max() function can return up to INT_MAX so this buffer is not large enough. Also use snprintf() for extra safety. Fixes: 403376dd ("ptp: add debugfs interface to see applied channel masks") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Link: https://lore.kernel.org/r/d4b1a995-a0cb-4125-aa1d-5fd5044aba1d@moroto.mountainSigned-off-by: Jakub Kicinski <kuba@kernel.org>
Showing
Please register or sign in to comment