target: target_core_transport: Don't try to strlen() an integer
Subsystems (2)
PATCH 1/1 target: target_core_transport: Don't try to strlen() an integer
In transport_dump_vpd_ident_type() we try to call strlen() on the integer len which is obviously a typo; take the length of the string already in buf instead.
Fixes 6cfa853ceee4a (target: target_core_transport.c: Cleaning up missing null-terminate
in conjunction with strncpy)
Signed-off-by Mark Brown <[email protected]>
--- drivers/target/target_core_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/target/target_core_transport.c +1 -1
@@ -953,7 +953,7 @@ int transport_dump_vpd_ident_type(strlcat (buf,"SCSI name string\n" ,sizeof (buf));break ;default : - len =strlen (len); + len =strlen (buf);snprintf (&buf[len],sizeof (buf) - len,"Unsupported: 0x%02x\n" , vpd->device_identifier_type); ret = -EINVAL ;
Signature · 1 line
2.1.0