diff options
author | mrwastl <mrwastl@users.sourceforge.net> | 2010-05-10 18:29:53 +0200 |
---|---|---|
committer | mrwastl <mrwastl@users.sourceforge.net> | 2010-05-10 18:29:53 +0200 |
commit | c424949dca82dc2c3cae3908a03df2ae1e77a5ee (patch) | |
tree | d7d9f85ec21ea228d9a2045fa5bb41ca1d536b18 /common.c | |
parent | 59b3b1f860e6cc606b85f6acf54b776e83ed7882 (diff) | |
download | vdr-plugin-graphlcd-c424949dca82dc2c3cae3908a03df2ae1e77a5ee.tar.gz vdr-plugin-graphlcd-c424949dca82dc2c3cae3908a03df2ae1e77a5ee.tar.bz2 |
added missing out-of-bounds paranoia check
Diffstat (limited to 'common.c')
-rw-r--r-- | common.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -45,7 +45,7 @@ GLCD::cType TimeType(time_t Time, const std::string &Format) { // for vdr < 1.5.x: force locale for correct language output. for >= 1.5.x: system locale should be fine #if APIVERSNUM < 10503 - setlocale(LC_TIME, locID[Setup.OSDLanguage]); + setlocale(LC_TIME, ( Setup.OSDLanguage < (int)(sizeof(locID)/sizeof(char*)) ) ? locID[Setup.OSDLanguage] : "en_US" ); #endif strftime(result, sizeof(result), Format.c_str(), tm); |