diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 07:41:07 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 07:42:00 +0000 |
commit | 45b4f719eac15a8a7857c50a539ff21d809ec3bb (patch) | |
tree | 866e43ed8237b2bff203037b824fba7d5561525d | |
parent | Building with gcc-10 instead of gcc-12. (diff) | |
download | linux-45b4f719eac15a8a7857c50a539ff21d809ec3bb.tar.xz linux-45b4f719eac15a8a7857c50a539ff21d809ec3bb.zip |
Adding patch to fix FTBFS in drivers/media/pci/cx18 with gcc-10 (Closes: #1027456).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/patches/bugfix/all/media-cx18-avoid-strlen-call-that-triggers-ice-in-gc.patch | 41 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/debian/patches/bugfix/all/media-cx18-avoid-strlen-call-that-triggers-ice-in-gc.patch b/debian/patches/bugfix/all/media-cx18-avoid-strlen-call-that-triggers-ice-in-gc.patch new file mode 100644 index 000000000..7c7b20ea3 --- /dev/null +++ b/debian/patches/bugfix/all/media-cx18-avoid-strlen-call-that-triggers-ice-in-gc.patch @@ -0,0 +1,41 @@ +From: Ben Hutchings <benh@debian.org> +Date: Sun, 5 Mar 2023 19:05:14 +0100 +Subject: media: cx18: Avoid strlen() call that triggers ICE in gcc 10 +Bug-Debian: https://bugs.debian.org/1027456 + +Commit e9a40e1585d7 "fortify: Do not cast to "unsigned char"", +included in 6.2 and backported into 6.1.2, triggers an ICE in +bullseye's gcc 10 when compiling cx18-i2c.c. This change specifically +affects use of the strlen() function. + +The compiler has been fixed in sid but not yet in bullseye. Until +that happens, we need a workaround here. + +init_cx18_i2c() initialises i2c_adapter instances from a template and +then appends to their names by calling sprintf(...name + +strlen(...name), ...). Avoid using strlen() here by rewriting the +entire name field instead of appending. + +Signed-off-by: Ben Hutchings <ben@decadent.org.uk> +--- + drivers/media/pci/cx18/cx18-i2c.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/pci/cx18/cx18-i2c.c b/drivers/media/pci/cx18/cx18-i2c.c +index a83435245251..a6ce1c204937 100644 +--- a/drivers/media/pci/cx18/cx18-i2c.c ++++ b/drivers/media/pci/cx18/cx18-i2c.c +@@ -229,8 +229,8 @@ int init_cx18_i2c(struct cx18 *cx) + /* Setup adapter */ + cx->i2c_adap[i] = cx18_i2c_adap_template; + cx->i2c_adap[i].algo_data = &cx->i2c_algo[i]; +- sprintf(cx->i2c_adap[i].name + strlen(cx->i2c_adap[i].name), +- " #%d-%d", cx->instance, i); ++ sprintf(cx->i2c_adap[i].name, "%s #%d-%d", ++ cx18_i2c_adap_template.name, cx->instance, i); + i2c_set_adapdata(&cx->i2c_adap[i], &cx->v4l2_dev); + cx->i2c_adap[i].dev.parent = &cx->pci_dev->dev; + } +-- +2.30.2 + diff --git a/debian/patches/series b/debian/patches/series index 313109c12..2929d88f9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -103,6 +103,7 @@ features/arm64/quartz64/arm64-dts-rockchip-Add-SOQuartz-Model-A-baseboard.patch # Miscellaneous bug fixes bugfix/all/disable-some-marvell-phys.patch bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch +bugfix/all/media-cx18-avoid-strlen-call-that-triggers-ice-in-gc.patch # Miscellaneous features |