]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
locale: fix possible out-of-array access, fixes #2972
authorJaroslav Kysela <perex@perex.cz>
Thu, 25 Jun 2015 11:55:06 +0000 (13:55 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 25 Jun 2015 11:56:02 +0000 (13:56 +0200)
src/tvh_locale.c

index 7fc311bbd6929c3b6e50f2faa55fd71dc0b8dc32..1b3414deaca84024f6f38beb8423c5cd56afa72a 100644 (file)
@@ -180,13 +180,13 @@ static void tvh_gettext_default_init(void)
 
   strncpy(dflt, p, sizeof(dflt)-1);
   dflt[sizeof(dflt)-1] = '\0';
-  for (p = dflt; p && *p != '.'; p++);
+  for (p = dflt; *p && *p != '.'; p++);
   if (*p == '.') *p = '\0';
 
   if ((lng_default = lng_get_locale(dflt)) != NULL)
     return;
 
-  for (p = dflt; p && *p != '_'; p++);
+  for (p = dflt; *p && *p != '_'; p++);
   if (*p == '_') *p = '\0';
 
   if ((lng_default = lng_get_locale(dflt)) != NULL)