On Tue, Jun 29, 2021 at 9:14 AM Martin K. Petersen <martin.petersen@xxxxxxxxxx> wrote: > > > Sreekanth, > > > - strncpy(drv_info->os_name, utsname()->sysname, sizeof(drv_info->os_name)); > > - drv_info->os_name[sizeof(drv_info->os_name) - 1] = 0; > > - strncpy(drv_info->os_version, utsname()->release, sizeof(drv_info->os_version)); > > - drv_info->os_version[sizeof(drv_info->os_version) - 1] = 0; > > + memcpy(drv_info->os_name, utsname()->sysname, sizeof(drv_info->os_name) - 1); > > + memcpy(drv_info->os_version, utsname()->release, sizeof(drv_info->os_version) - 1); > > strscpy()? Agreed. Posted a new patch using strscpy(). Thanks, Sreekanth > > -- > Martin K. Petersen Oracle Linux Engineering
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature