Buffer overflow in initializing character table

Message ID 4687B851.5080608@cadsoft.de
State New
Headers

Commit Message

Klaus Schmidinger July 1, 2007, 2:21 p.m. UTC
  Marco Schlüßler has sent me the attached patch that fixes a
buffer overflow in initializing VDR's character table.

Since I'll be away from home for another two weeks and this
might be a problem for others, too, I'm posting it here before
the next official developer version.

Klaus
  

Patch

diff -bur vdr-1.5.5_orig/tools.c vdr-1.5.5/tools.c
--- vdr-1.5.5_orig/tools.c	2007-06-26 21:03:21.000000000 +0200
+++ vdr-1.5.5/tools.c	2007-06-26 21:05:18.000000000 +0200
@@ -756,7 +756,7 @@ 
      char buf[129];
      for (int i = 0; i < 128; i++)
          buf[i] = i + 128;
-     buf[129] = 0;
+     buf[128] = 0;
      cCharSetConv csc(CharacterTable);
      const char *s = csc.Convert(buf);
      int i = 0;