Skip to content
This repository has been archived by the owner. It is now read-only.
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 Jan 8, 2019
1 parent 375cfc4 commit e77a109f8cf60d9eafdf005ab5c851d5f576c01e
Showing 1 changed file with 4 additions and 0 deletions.
@@ -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.