From: Martin Holst Swende Date: Fri, 4 Apr 2014 18:14:58 +0000 (+0200) Subject: Final (?) fixes to git versioning https://github.com/Proxmark/proxmark3/issues/10 X-Git-Tag: v1.1.0~5 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/cba867f20282576a947b2c7f2396cc7b62be655a Final (?) fixes to git versioning https://github.com/Proxmark/proxmark3/issues/10 --- diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 7af47a51..b6c32200 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -336,7 +336,7 @@ extern struct version_information version_information; extern char *_bootphase1_version_pointer, _flash_start, _flash_end; void SendVersion(void) { - char temp[48]; /* Limited data payload in USB packets */ + char temp[256]; /* Limited data payload in USB packets */ DbpString("Prox/RFID mark3 RFID instrument"); /* Try to find the bootrom version information. Expect to find a pointer at diff --git a/armsrc/util.c b/armsrc/util.c index a250e529..2d3aab9c 100644 --- a/armsrc/util.c +++ b/armsrc/util.c @@ -227,27 +227,27 @@ void FormatVersionInformation(char *dst, int len, const char *prefix, void *vers dst[0] = 0; strncat(dst, prefix, len); 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) { - strncat(dst, "Version information not understood", len); + strncat(dst, "Version information not understood", len - strlen(dst) - 1); return; } if(!v->present) { - strncat(dst, "Version information not available", len); + strncat(dst, "Version information not available", len - strlen(dst) - 1); return; } - strncat(dst, v->gitversion, len); + strncat(dst, v->gitversion, len - strlen(dst) - 1); if(v->clean == 0) { - strncat(dst, "-unclean", len); + strncat(dst, "-unclean", len - strlen(dst) - 1); } 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); } // -------------------------------------------------------------------------