diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2013-04-07 14:49:42 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2013-04-07 14:49:42 +0200 |
commit | cf7f25fe5049ea5b6dc9a5c4ae8962264d5e801d (patch) | |
tree | 9512cc5df3c0400ffa1568cb93a6a7ff43714b91 | |
parent | b6b66acfc7a0597f213fa01d8e6930f43c201b36 (diff) | |
download | vdr-cf7f25fe5049ea5b6dc9a5c4ae8962264d5e801d.tar.gz vdr-cf7f25fe5049ea5b6dc9a5c4ae8962264d5e801d.tar.bz2 |
Fixed an endless loop in cTextWrapper::Set() in case the given Width is smaller than one character
-rw-r--r-- | CONTRIBUTORS | 5 | ||||
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | font.c | 7 |
3 files changed, 11 insertions, 5 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 780ad5ff..1b2c84a9 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1788,6 +1788,7 @@ Udo Richter <udo_richter@gmx.de> for requesting to keep using relative paths when building plugins locally for fixing a problem with detecting user inactivity in case the system time is changed after VDR has been started + for a patch that was used to add definitions for older DVB API versions, back until 5.0 Sven Kreiensen <svenk@kammer.uni-hannover.de> for his help in keeping 'channels.conf.terr' up to date @@ -3135,3 +3136,7 @@ Zoran Turalija <zoran.turalija@gmail.com> for translating OSD texts to the Serbian language for adding maximum SNR and signal strength value for TechniSat SkyStar HD2 for pointing out that the language file sr_SR.po should be renamed to sr_RS.po + +Stefan Braun <louis.braun@gmx.de> + for reporting an endless loop in cTextWrapper::Set() in case the given Width is smaller + than one character @@ -7787,6 +7787,8 @@ Video Disk Recorder Revision History - Fixed initializing cDevice::keepTracks. -2013-04-05: Version 2.1.1 +2013-04-07: Version 2.1.1 - Fixed initializing cDevice::keepTracks. +- Fixed an endless loop in cTextWrapper::Set() in case the given Width is smaller than + one character (reported by Stefan Braun). @@ -6,7 +6,7 @@ * * BiDi support by Osama Alrawab <alrawab@hotmail.com> @2008 Tripoli-Libya. * - * $Id: font.c 2.13 2012/06/02 13:38:28 kls Exp $ + * $Id: font.c 3.1 2013/04/07 14:42:13 kls Exp $ */ #include "font.h" @@ -592,7 +592,7 @@ void cTextWrapper::Set(const char *Text, const cFont *Font, int Width) p = Blank; continue; } - else { + else if (w > 0) { // there has to be at least one character before the newline // Here's the ugly part, where we don't have any whitespace to // punch in a newline, so we need to make room for it: if (Delim) @@ -608,8 +608,7 @@ void cTextWrapper::Set(const char *Text, const cFont *Font, int Width) continue; } } - else - w += cw; + w += cw; if (strchr("-.,:;!?_", *p)) { Delim = p; Blank = NULL; |