diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-05-15 11:05:51 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-05-15 11:10:12 (GMT) |
commit | fe16aedd32137828fb0ab9cdd68ef043e17c59ee (patch) | |
tree | a78c8b03456249c034fddf9a0fe75f2fc89bd309 /libversion/gitversion.cpp.in | |
parent | 9834a247d37a24c066973daaa902dd539f7e1ee7 (diff) | |
download | Doxygen-fe16aedd32137828fb0ab9cdd68ef043e17c59ee.zip Doxygen-fe16aedd32137828fb0ab9cdd68ef043e17c59ee.tar.gz Doxygen-fe16aedd32137828fb0ab9cdd68ef043e17c59ee.tar.bz2 |
Fix build issue: strlcpy & strlcat are BSD specific
Diffstat (limited to 'libversion/gitversion.cpp.in')
-rw-r--r-- | libversion/gitversion.cpp.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libversion/gitversion.cpp.in b/libversion/gitversion.cpp.in index 50ce1d2..242dd59 100644 --- a/libversion/gitversion.cpp.in +++ b/libversion/gitversion.cpp.in @@ -13,8 +13,8 @@ const char *getGitVersion(void) static bool init = false; if (!init) { - strncpy(gitVersionString,"@GIT_HEAD_SHA1@",BUF_SIZE); - strncat(gitVersionString,!strcmp("@GIT_IS_DIRTY@","true")?"*":"",BUF_SIZE); + strncpy(gitVersionString,"@GIT_HEAD_SHA1@",BUF_SIZE-1); + strncat(gitVersionString,!strcmp("@GIT_IS_DIRTY@","true")?"*":"",BUF_SIZE-1); if (!strcmp("@GIT_HEAD_SHA1@", "GIT-NOTFOUND")) gitVersionString[0] = '\0'; gitVersionString[BUF_SIZE-1]='\0'; init = true; |