diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 1ad4daf6..173f2646 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3371,6 +3371,7 @@ Stefan Hofmann for suggesting to implement jumping between errors while replaying a recording for adding vdrrootdir and incdir to vdr.pc for fixing some typos in the translation files + for adding 1 to Utf8BufSize() for worst case Stefan Blochberger for suggesting to automatically display the progress display whenever replay of a diff --git a/HISTORY b/HISTORY index 00fe4b3b..c47a51b1 100644 --- a/HISTORY +++ b/HISTORY @@ -10049,3 +10049,4 @@ Video Disk Recorder Revision History schedule. - Fixed a possible deadlock when canceling an editing process. - Checking for VPS control is now limited to local timers. +- Added 1 to Utf8BufSize() for worst case (thanks to Stefan Hofmann). diff --git a/tools.h b/tools.h index 8a83a1f3..3b9b7df3 100644 --- a/tools.h +++ b/tools.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.h 5.10 2024/09/01 20:43:40 kls Exp $ + * $Id: tools.h 5.11 2025/01/13 13:18:42 kls Exp $ */ #ifndef __TOOLS_H @@ -140,7 +140,7 @@ int Utf8FromArray(const uint *a, char *s, int Size, int Max = -1); // When allocating buffer space, make sure we reserve enough space to hold // a string in UTF-8 representation: -#define Utf8BufSize(s) ((s) * 4) +#define Utf8BufSize(s) ((s) * 4 + 1) // The following macros automatically use the correct versions of the character // class functions: