blu3bird / OpenHybrid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build fails: strncpy’ output truncated before terminating nul copying as many bytes from a string as its length

Rot127 opened this issue · comments

Build fails for newer gcc versions (I think beginning from ver. 8) with:
strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
for the files:

  • gre2tun.c
  • tun2gre.c
  • tundev.c

Workaround: Replace strncpy with memcpy.

Though this doesn't solve the truncation problem here!