OSDN Git Service

av: avoid driver path truncation
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 13 Jul 2018 12:07:49 +0000 (14:07 +0200)
committerXinfengZhang <carl.zhang@intel.com>
Thu, 20 Dec 2018 03:45:09 +0000 (19:45 -0800)
commit8e890e3a0a5c91ba921d9fbedc532c596ff46dd1
tree8ef1ec9fc9843edb7344e8a3e868fb792e8e66c9
parentf804f0ec3a9c06065ec194c0d888039a6083e6c1
av: avoid driver path truncation

Using strncat() and strncpy() may lead to string truncation, which
might generate other issues.

This patch replaces the usage of strncat() and strncpy() to generate
the driver path, with snprintf() safetly.

See more information here:
https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/
va/va.c