]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/util.c
Implemented new FPGA mode for iclass tag simulation. Reduces arm-side size of transfe...
[proxmark3-svn] / armsrc / util.c
index 905bad253bf2d334ada7c37dd011eb079945ba1a..5b68f5134cf16a1991aed51c463acb87b02994c8 100644 (file)
@@ -225,29 +225,29 @@ void FormatVersionInformation(char *dst, int len, const char *prefix, void *vers
 {
        struct version_information *v = (struct version_information*)version_information;
        dst[0] = 0;
 {
        struct version_information *v = (struct version_information*)version_information;
        dst[0] = 0;
-       strncat(dst, prefix, len);
+       strncat(dst, prefix, len-1);
        if(v->magic != VERSION_INFORMATION_MAGIC) {
        if(v->magic != VERSION_INFORMATION_MAGIC) {
-               strncat(dst, "Missing/Invalid version information", len);
+               strncat(dst, "Missing/Invalid version information", len - strlen(dst) - 1);
                return;
        }
        if(v->versionversion != 1) {
                return;
        }
        if(v->versionversion != 1) {
-               strncat(dst, "Version information not understood", len);
+               strncat(dst, "Version information not understood", len - strlen(dst) - 1);
                return;
        }
        if(!v->present) {
                return;
        }
        if(!v->present) {
-               strncat(dst, "Version information not available", len);
+               strncat(dst, "Version information not available", len - strlen(dst) - 1);
                return;
        }
 
                return;
        }
 
-       strncat(dst, v->svnversion, len);
+       strncat(dst, v->gitversion, len - strlen(dst) - 1);
        if(v->clean == 0) {
        if(v->clean == 0) {
-               strncat(dst, "-unclean", len);
+               strncat(dst, "-unclean", len - strlen(dst) - 1);
        } else if(v->clean == 2) {
        } else if(v->clean == 2) {
-               strncat(dst, "-suspect", len);
+               strncat(dst, "-suspect", len - strlen(dst) - 1);
        }
 
        }
 
-       strncat(dst, " ", len);
-       strncat(dst, v->buildtime, len);
+       strncat(dst, " ", len - strlen(dst) - 1);
+       strncat(dst, v->buildtime, len - strlen(dst) - 1);
 }
 
 //  -------------------------------------------------------------------------
 }
 
 //  -------------------------------------------------------------------------
Impressum, Datenschutz