From 5d2c2b27a6323e2666378b986129b2a7c2c39e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 6 Feb 2022 16:04:24 +0100 Subject: New upstream version 5.2.2GA --- app/bin/shortentext.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/bin/shortentext.c') diff --git a/app/bin/shortentext.c b/app/bin/shortentext.c index 6cd16e6..b1b2202 100644 --- a/app/bin/shortentext.c +++ b/app/bin/shortentext.c @@ -71,7 +71,9 @@ EllipsizeString(char *source, char *dest, size_t length) return; } - strncpy(resultString, source, length); + if ( dest ) + strncpy(resultString, source, length); + resultString[ length ] = '\0'; position = length - 1; @@ -89,4 +91,5 @@ EllipsizeString(char *source, char *dest, size_t length) strcpy(resultString + (strlen(resultString) - sizeof(ELLIPSIZE) + 1), ELLIPSIZE); } return; -} \ No newline at end of file +} + -- cgit v1.2.3