diff options
author | Joachim Wilke <vdr@joachim-wilke.de> | 2010-10-31 13:43:13 +0100 |
---|---|---|
committer | Joachim Wilke <vdr@joachim-wilke.de> | 2010-10-31 13:43:13 +0100 |
commit | c19273f938a73cb6507d10eef6e83955e76c9a00 (patch) | |
tree | cd693f9a6107472763afee0ca7d0ab0d77c92fb0 | |
parent | c3c2cbc91f8653c897c872562244511ecff7c857 (diff) | |
download | vdr-plugin-lcdproc-c19273f938a73cb6507d10eef6e83955e76c9a00.tar.gz vdr-plugin-lcdproc-c19273f938a73cb6507d10eef6e83955e76c9a00.tar.bz2 |
Fixed a possible buffer overflow in cLcd::SetRunning which caused an ABRT signal with recent libc
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | lcd.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -94,6 +94,8 @@ Head: - implemented cStatus::SetAudioChannel and SetAudioTrack to display audio track information on lcd. - adapted Makefile for VDR >= 1.7.13 +- fixed a possible buffer overflow in cLcd::SetRunning which caused an ABRT signal with + recent libc
\ No newline at end of file @@ -495,8 +495,8 @@ void cLcd::SetRunning( bool nownext, const char *string1, const char *string2, c ThreadStateData.lcdfullbuffer[LCDTITLE][i++]=' '; } ThreadStateData.lcdfullbuffer[LCDTITLE][i]='\0'; - sprintf(now1,"%s",ThreadStateData.lcdbuffer[LCDTITLE][2]); - sprintf(now2,"%s",ThreadStateData.lcdbuffer[LCDTITLE][3]); + snprintf(now1,LCDMAXWID,"%s",ThreadStateData.lcdbuffer[LCDTITLE][2]); + snprintf(now2,LCDMAXWID,"%s",ThreadStateData.lcdbuffer[LCDTITLE][3]); EndMutualExclusion(); } |