Skip to content
Permalink
Browse files

lib: make sure that we don't copy in a to large initresp from device

reported by Christian Reitter
  • Loading branch information
klali committed Dec 27, 2018
1 parent 375cfc4 commit e77a109f8cf60d9eafdf005ab5c851d5f576c01e
Showing with 4 additions and 0 deletions.
  1. +4 −0 u2f-host/devs.c
@@ -247,6 +247,10 @@ init_device (u2fh_devs * devs, struct u2fdevice *dev)
&resplen) == U2FH_OK)
{
U2FHID_INIT_RESP initresp;
if (resplen > sizeof (initresp))
{
return U2FH_MEMORY_ERROR;
}
memcpy (&initresp, resp, resplen);
dev->cid = initresp.cid;
dev->versionInterface = initresp.versionInterface;

0 comments on commit e77a109

Please sign in to comment.
You can’t perform that action at this time.