]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhf14a.c
FIX: Coverity, out-of-bounds write, CID# 121336, s_index should take factor in consi...
[proxmark3-svn] / client / cmdhf14a.c
index 8d15f73142494390c69b9129313bad559cdfbbe2..d195267243907fa70e83c68750190fdf6b161617 100644 (file)
@@ -731,8 +731,10 @@ int CmdHF14ACmdRaw(const char *cmd) {
 
        if(topazmode)
                c.arg[0] |= ISO14A_TOPAZMODE;
-               
+                       
        // Max buffer is USB_CMD_DATA_SIZE
+       datalen = (datalen > USB_CMD_DATA_SIZE) ? USB_CMD_DATA_SIZE : datalen;
+               
     c.arg[1] = (datalen & 0xFFFF) | (numbits << 16);
     memcpy(c.d.asBytes,data,datalen);
 
Impressum, Datenschutz