aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libexif/IptcParse.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libexif/IptcParse.cpp b/lib/libexif/IptcParse.cpp
index 1fc7dfb4a9..a0bba1632e 100644
--- a/lib/libexif/IptcParse.cpp
+++ b/lib/libexif/IptcParse.cpp
@@ -201,8 +201,10 @@ bool CIptcParse::Process (const unsigned char* const Data, const unsigned short
// there may be multiple keywords - lets join them
size_t maxLen = MAX_IPTC_STRING - strlen(tag);
if (maxLen > 2)
+ {
strcat(tag, ", ");
- strncat(tag, pos, min(length, MAX_IPTC_STRING - maxLen - 3));
+ strncat(tag, pos, min(length, maxLen - 3));
+ }
}
/* if (id == SLIDE_IPTC_CAPTION)
{