<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 30, 2016 at 6:17 PM, Eric Engestrom <span dir="ltr"><<a href="mailto:eric@engestrom.ch" target="_blank">eric@engestrom.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">CoverityID: 1358935<br>
<br>
Signed-off-by: Eric Engestrom <<a href="mailto:eric@engestrom.ch">eric@engestrom.ch</a>><br>
---<br>
src/intel/vulkan/anv_device.c | 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c<br>
index 046777d..e451138 100644<br>
--- a/src/intel/vulkan/anv_device.c<br>
+++ b/src/intel/vulkan/anv_device.c<br>
@@ -566,7 +566,8 @@ void anv_GetPhysicalDeviceProperties(<br>
.sparseProperties = {0}, /* Broadwell doesn't do sparse. */<br>
};<br>
<br>
- strcpy(pProperties->deviceName, pdevice->name);<br>
+ strncpy(pProperties->deviceName, pdevice->name, sizeof(pProperties->deviceName) - 1);<br>
+ pProperties->deviceName[sizeof(pProperties->deviceName) - 1] = 0;<br></blockquote><div><br></div><div>This is a case we'll never have to worry about. The string being copied comes from i965_pci_ids.h and the destination is always 256 characters. I don't think our marketing people are ever going to come up with a name quite that long. :-)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
anv_device_get_cache_uuid(pProperties->pipelineCacheUUID);<br>
}<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.8.3<br>
<br>
</font></span></blockquote></div><br></div></div>