]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
CHG: change the snprint call in GetModelStrFromCID.
authoriceman1001 <iceman@iuse.se>
Sun, 5 Apr 2015 12:28:29 +0000 (14:28 +0200)
committericeman1001 <iceman@iuse.se>
Sun, 5 Apr 2015 12:28:29 +0000 (14:28 +0200)
CHG: tighten up the maxium allowed errors in Biphase (from 1 to zero allowed errors)

client/cmdlft55xx.c

index ed7e2c800950464fa6858d8825028b4a7713e7ee..a75d2fd37b78923bc6bbb986a2d8e2589f17a81a 100644 (file)
@@ -308,7 +308,7 @@ bool DecodeT55xxBlock(){
                        break;\r
                case DEMOD_BI:\r
                case DEMOD_BIa:\r
-                       sprintf(cmdStr,"0 %d %d 1", bitRate[config.bitrate], config.inverted );\r
+                       sprintf(cmdStr,"0 %d %d 0", bitRate[config.bitrate], config.inverted );\r
                        ans = ASKbiphaseDemod(cmdStr, FALSE);\r
                        break;\r
                default:\r
@@ -954,7 +954,6 @@ char * GetBitRateStr(uint32_t id){
        return buf;\r
 }\r
 \r
-\r
 char * GetSaferStr(uint32_t id){\r
        static char buf[20];\r
        char *retStr = buf;\r
@@ -1023,8 +1022,8 @@ char * GetModelStrFromCID(uint32_t cid){
        static char buf[10];\r
        char *retStr = buf;\r
        \r
-       if (cid == 1) sprintf(retStr,"ATA5577M1");\r
-       if (cid == 2) sprintf(retStr,"ATA5577M2");      \r
+       if (cid == 1) snprintf(retStr, sizeof(buf),"ATA5577M1");\r
+       if (cid == 2) snprintf(retStr, sizeof(buf),"ATA5577M2");        \r
        return buf;\r
 }\r
 \r
Impressum, Datenschutz