diff options
Diffstat (limited to 'meta-multimedia/recipes-dvb/tvheadend')
-rw-r--r-- | meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-allocate-space-for-buf-on-heap.patch | 46 | ||||
-rw-r--r-- | meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb | 3 |
2 files changed, 1 insertions, 48 deletions
diff --git a/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-allocate-space-for-buf-on-heap.patch b/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-allocate-space-for-buf-on-heap.patch deleted file mode 100644 index cbd76b6ab..000000000 --- a/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-allocate-space-for-buf-on-heap.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From d4a405f87fc215c14e610a25b5a6b14060c1ef15 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 25 Dec 2019 13:53:52 -0800 | ||
4 | Subject: [PATCH] allocate space for buf on heap | ||
5 | |||
6 | Avoids | ||
7 | | src/epggrab/module/xmltv.c:204:47: error: '%s' directive output may be truncated writing between 2 and 2147483645 bytes into a region of size 115 [-Werror=format-truncation=] | ||
8 | | 204 | snprintf(buf, sizeof(buf)-1, "ddprogid://%s/%s", mod->id, s); | ||
9 | | | ^~ | ||
10 | |||
11 | Upstream-Status: Submitted [https://github.com/tvheadend/tvheadend/pull/1324] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | src/epggrab/module/xmltv.c | 6 ++++-- | ||
15 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/src/epggrab/module/xmltv.c b/src/epggrab/module/xmltv.c | ||
18 | index 34ab05bdb..b1a956614 100644 | ||
19 | --- a/src/epggrab/module/xmltv.c | ||
20 | +++ b/src/epggrab/module/xmltv.c | ||
21 | @@ -197,11 +197,12 @@ static void parse_xmltv_dd_progid | ||
22 | (epggrab_module_t *mod, const char *s, char **uri, char **suri, | ||
23 | epg_episode_num_t *epnum) | ||
24 | { | ||
25 | - char buf[128]; | ||
26 | if (strlen(s) < 2) return; | ||
27 | |||
28 | + char* buf = (char *)malloc(strlen(s) + strlen(mod->id) + 13); | ||
29 | + buf[strlen(s) + strlen(mod->id) + 12] = '\0'; | ||
30 | /* Raw URI */ | ||
31 | - snprintf(buf, sizeof(buf)-1, "ddprogid://%s/%s", mod->id, s); | ||
32 | + snprintf(buf, strlen(s) + strlen(mod->id) + 12, "ddprogid://%s/%s", mod->id, s); | ||
33 | |||
34 | /* SH - series without episode id so ignore */ | ||
35 | if (strncmp("SH", s, 2)) | ||
36 | @@ -219,6 +220,7 @@ static void parse_xmltv_dd_progid | ||
37 | if (buf[e+1]) sscanf(&buf[e+1], "%hu", &(epnum->e_num)); | ||
38 | } | ||
39 | } | ||
40 | + free(buf); | ||
41 | } | ||
42 | |||
43 | /** | ||
44 | -- | ||
45 | 2.24.1 | ||
46 | |||
diff --git a/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb b/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb index 20faef047..82c2cbe08 100644 --- a/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb +++ b/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb | |||
@@ -10,10 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=9cae5acac2e9ee2fc3aec01ac88ce5db" | |||
10 | 10 | ||
11 | SRC_URI = "git://github.com/tvheadend/tvheadend.git \ | 11 | SRC_URI = "git://github.com/tvheadend/tvheadend.git \ |
12 | file://0001-adjust-for-64bit-time_t.patch \ | 12 | file://0001-adjust-for-64bit-time_t.patch \ |
13 | file://0001-allocate-space-for-buf-on-heap.patch \ | ||
14 | " | 13 | " |
15 | 14 | ||
16 | SRCREV = "fda89e85e0b6ae796d8a09e178d3937aa7869270" | 15 | SRCREV = "ce09077056f9c6558c188d135cec3be85cc9c200" |
17 | PV = "4.3+git${SRCPV}" | 16 | PV = "4.3+git${SRCPV}" |
18 | PKGV = "4.3+git${GITPKGV}" | 17 | PKGV = "4.3+git${GITPKGV}" |
19 | 18 | ||