]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
DVR: fix alloca() for date in _dvr_sub_scraper_friendly()
authorJaroslav Kysela <perex@perex.cz>
Wed, 20 Jun 2018 11:04:04 +0000 (13:04 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 20 Jun 2018 11:04:04 +0000 (13:04 +0200)
src/dvr/dvr_rec.c

index 2e6f12a2b6f56167c36680d9142b5d64c3c471e9..677c52124931a5af3d46594acadc21305977c953 100644 (file)
@@ -471,7 +471,7 @@ _dvr_sub_scraper_friendly(const char *id, const char *fmt, const void *aux, char
      */
     if (ebc) {
       if (ebc->copyright_year) {
-        date_buf = alloca(10);
+        date_buf = alloca(12);
         sprintf(date_buf, "%04d", ebc->copyright_year);
       } else {
         /* Some providers use first_aired as really the copyright date. */
@@ -480,7 +480,7 @@ _dvr_sub_scraper_friendly(const char *id, const char *fmt, const void *aux, char
           /* Get just the year part */
           struct tm tm;
           if (localtime_r(&first_aired, &tm)) {
-            date_buf = alloca(10);
+            date_buf = alloca(12);
             sprintf(date_buf, "%04d", tm.tm_year + 1900);
           }
         }