From: Jaroslav Kysela Date: Wed, 20 Jun 2018 11:04:04 +0000 (+0200) Subject: DVR: fix alloca() for date in _dvr_sub_scraper_friendly() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5750826be0cefb1069a08d90608147565954a8b3;p=thirdparty%2Ftvheadend.git DVR: fix alloca() for date in _dvr_sub_scraper_friendly() --- diff --git a/src/dvr/dvr_rec.c b/src/dvr/dvr_rec.c index 2e6f12a2b..677c52124 100644 --- a/src/dvr/dvr_rec.c +++ b/src/dvr/dvr_rec.c @@ -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); } }