core: fix build warning
> In file included from /usr/include/string.h:519,
> from core/socket_info.c:34:
> In function 'strncpy',
> inlined from 'fix_hostname' at core/socket_info.c:1741:2:
> Warning: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
> 95 | return __builtin___strncpy_chk (__dest, __src, __len,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 96 | __glibc_objsize (__dest));
> | ~~~~~~~~~~~~~~~~~~~~~~~~~
> core/socket_info.c: In function 'fix_hostname':
> core/socket_info.c:1741:38: note: length computed here
> 1741 | strncpy(address_str->s, tmp, strlen(tmp)+1);
> | ^~~~~~~~~~~
> In file included from /usr/include/string.h:519,
> from core/socket_info.c:34:
> In function 'strncpy',
> inlined from 'build_iface_list' at core/socket_info.c:1554:5:
> Warning: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: '__builtin_strncpy' output may be truncated copying 63 bytes from a string of length 63 [-Wstringop-truncation]
> 95 | return __builtin___strncpy_chk (__dest, __src, __len,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 96 | __glibc_objsize (__dest));
> | ~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from /usr/include/string.h:519,
> from core/cfg.y:40:
> In function 'strncpy',
> inlined from 'yyparse' at core/cfg.y:708:6:
> Warning: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
> 95 | return __builtin___strncpy_chk (__dest, __src, __len,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 96 | __glibc_objsize (__dest));
> | ~~~~~~~~~~~~~~~~~~~~~~~~~
> core/cfg.tab.c: In function 'yyparse':
> core/cfg.y:708:84: note: length computed here
> 708 | strncpy($$, $1, strlen($1)+1);
> | ^
> In file included from /usr/include/string.h:519,
> from core/cfg.y:40:
> In function 'strncpy',
> inlined from 'yyparse' at core/cfg.y:699:5:
> Warning: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
> 95 | return __builtin___strncpy_chk (__dest, __src, __len,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 96 | __glibc_objsize (__dest));
> | ~~~~~~~~~~~~~~~~~~~~~~~~~
> core/cfg.tab.c: In function 'yyparse':
> core/cfg.y:699:76: note: length computed here
> 699 | strncpy($$, $1, strlen($1)+1);
> | ^
> In file included from /usr/include/string.h:519,
> from core/cfg.y:40:
> In function 'strncpy',
> inlined from 'yyparse' at core/cfg.y:689:6:
> Warning: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
> 95 | return __builtin___strncpy_chk (__dest, __src, __len,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 96 | __glibc_objsize (__dest));
> | ~~~~~~~~~~~~~~~~~~~~~~~~~
> core/cfg.tab.c: In function 'yyparse':
> core/cfg.y:689:70: note: length computed here
> 689 | strncpy($$, tmp, strlen(tmp)+1);
> |