~firmware-testing-team/fwts/master

Viewing all changes in revision 4578.

  • Committer: Ivan Hu
  • Author(s): Colin Ian King
  • Date: 2020-07-28 23:43:30 UTC
  • Revision ID: git-v1:fdd52c0fd509a7723ff6c7146ae96f5ec289da0c
lib: fwts_modprobe: add helper to build module path name

The current method of building a module pathname may cause truncation
and gcc-10 generates build errors because of this. Add a helper that
builds the module path that uses the BSD strlcat for safe string
concatenation with known (and ignored) truncation since we know that
the module path name can't exceed PATH_MAX size.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Ivan Hu <ivan.hu@canonical.com>
Acked-by: Alex Hung <alex.hung@canonical.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: