summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authormrwastl <mrwastl@users.sourceforge.net>2010-05-10 18:29:53 +0200
committermrwastl <mrwastl@users.sourceforge.net>2010-05-10 18:29:53 +0200
commitc424949dca82dc2c3cae3908a03df2ae1e77a5ee (patch)
treed7d9f85ec21ea228d9a2045fa5bb41ca1d536b18 /common.c
parent59b3b1f860e6cc606b85f6acf54b776e83ed7882 (diff)
downloadvdr-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common.c b/common.c
index f791d16..fff0013 100644
--- a/common.c
+++ b/common.c
@@ -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);