• Daniel P. Berrangé's avatar
    Ensure nul termination of hostname · d7684186
    Daniel P. Berrangé authored
    Newest GCC warns that the string copying is potentially truncated and
    thus not nul terminated.
    
    In file included from /usr/include/string.h:494,
                     from ../../src/Virt_HostSystem.c:23:
    In function ‘strncpy’,
        inlined from ‘resolve_host’ at ../../src/Virt_HostSystem.c:55:28,
        inlined from ‘get_fqdn’ at ../../src/Virt_HostSystem.c:92:23,
        inlined from ‘set_host_system_properties’ at ../../src/Virt_HostSystem.c:109:13:
    /usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 256 equals destination size [-Werror=stringop-truncation]
      106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In function ‘strncpy’,
        inlined from ‘resolve_host’ at ../../src/Virt_HostSystem.c:67:17,
        inlined from ‘get_fqdn’ at ../../src/Virt_HostSystem.c:92:23,
        inlined from ‘set_host_system_properties’ at ../../src/Virt_HostSystem.c:109:13:
    /usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 256 equals destination size [-Werror=stringop-truncation]
      106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    Signed-off-by: 's avatarDaniel P. Berrangé <berrange@redhat.com>
    d7684186
Name
Last commit
Last update
..
Makefile.am Loading commit data...
Virt_AllocationCapabilities.c Loading commit data...
Virt_AllocationCapabilities.h Loading commit data...
Virt_AppliedFilterList.c Loading commit data...
Virt_ComputerSystem.c Loading commit data...
Virt_ComputerSystem.h Loading commit data...
Virt_ComputerSystemIndication.c Loading commit data...
Virt_ComputerSystemIndication.h Loading commit data...
Virt_ComputerSystemMigrationIndication.c Loading commit data...
Virt_ConcreteComponent.c Loading commit data...
Virt_ConsoleRedirectionService.c Loading commit data...
Virt_ConsoleRedirectionService.h Loading commit data...
Virt_ConsoleRedirectionServiceCapabilities.c Loading commit data...
Virt_ConsoleRedirectionServiceCapabilities.h Loading commit data...
Virt_Device.c Loading commit data...
Virt_Device.h Loading commit data...
Virt_DevicePool.c Loading commit data...
Virt_DevicePool.h Loading commit data...
Virt_ElementAllocatedFromPool.c Loading commit data...
Virt_ElementCapabilities.c Loading commit data...
Virt_ElementConformsToProfile.c Loading commit data...
Virt_ElementSettingData.c Loading commit data...
Virt_EnabledLogicalElementCapabilities.c Loading commit data...
Virt_EnabledLogicalElementCapabilities.h Loading commit data...
Virt_EntriesInFilterList.c Loading commit data...
Virt_FilterEntry.c Loading commit data...
Virt_FilterEntry.h Loading commit data...
Virt_FilterList.c Loading commit data...
Virt_FilterList.h Loading commit data...
Virt_HostSystem.c Loading commit data...
Virt_HostSystem.h Loading commit data...
Virt_HostedAccessPoint.c Loading commit data...
Virt_HostedDependency.c Loading commit data...
Virt_HostedFilterList.c Loading commit data...
Virt_HostedResourcePool.c Loading commit data...
Virt_HostedService.c Loading commit data...
Virt_KVMRedirectionSAP.c Loading commit data...
Virt_KVMRedirectionSAP.h Loading commit data...
Virt_NestedFilterList.c Loading commit data...
Virt_RASD.c Loading commit data...
Virt_RASD.h Loading commit data...
Virt_ReferencedProfile.c Loading commit data...
Virt_RegisteredProfile.c Loading commit data...
Virt_RegisteredProfile.h Loading commit data...
Virt_ResourceAllocationFromPool.c Loading commit data...
Virt_ResourceAllocationSettingDataIndication.c Loading commit data...
Virt_ResourcePoolConfigurationCapabilities.c Loading commit data...
Virt_ResourcePoolConfigurationService.c Loading commit data...
Virt_ResourcePoolConfigurationService.h Loading commit data...
Virt_SAPAvailableForElement.c Loading commit data...
Virt_ServiceAccessBySAP.c Loading commit data...
Virt_ServiceAffectsElement.c Loading commit data...
Virt_SettingsDefineCapabilities.c Loading commit data...
Virt_SettingsDefineCapabilities.h Loading commit data...
Virt_SettingsDefineState.c Loading commit data...
Virt_SwitchService.c Loading commit data...
Virt_SystemDevice.c Loading commit data...
Virt_VSMigrationCapabilities.c Loading commit data...
Virt_VSMigrationCapabilities.h Loading commit data...
Virt_VSMigrationService.c Loading commit data...
Virt_VSMigrationService.h Loading commit data...
Virt_VSMigrationSettingData.c Loading commit data...
Virt_VSMigrationSettingData.h Loading commit data...
Virt_VSSD.c Loading commit data...
Virt_VSSD.h Loading commit data...
Virt_VSSDComponent.c Loading commit data...
Virt_VirtualSystemManagementCapabilities.c Loading commit data...
Virt_VirtualSystemManagementCapabilities.h Loading commit data...
Virt_VirtualSystemManagementService.c Loading commit data...
Virt_VirtualSystemManagementService.h Loading commit data...
Virt_VirtualSystemSnapshotService.c Loading commit data...
Virt_VirtualSystemSnapshotService.h Loading commit data...
Virt_VirtualSystemSnapshotServiceCapabilities.c Loading commit data...
Virt_VirtualSystemSnapshotServiceCapabilities.h Loading commit data...
profiles.h Loading commit data...
svpc_types.h Loading commit data...