tag 660400 patch pending thanks Steven Chamberlain <steven@pyro.eu.org> (19/02/2012): > This is due to 'unsafe' format strings being supplied to printf in > FreeBSD-specific code, revealed by the -Wformat-security build hardening > option. I've attached a patch to fix this. Thanks, uploaded right away since we have many blockers for the freebsd-libs transition, I hope Michael will be fine with my being in a hurry. The patch for my NMU is attached. Also: Thanks to IRILL for sponsoring this BSP in Paris. Mraw, KiBi.
diff -Nru hal-0.5.14/debian/changelog hal-0.5.14/debian/changelog --- hal-0.5.14/debian/changelog 2011-08-12 14:41:15.000000000 +0000 +++ hal-0.5.14/debian/changelog 2012-02-19 04:44:41.000000000 +0000 @@ -1,3 +1,14 @@ +hal (0.5.14-7.1) unstable; urgency=high + + * Non-maintainer upload. + * Apply patch from Steven Chamberlain (thanks!) to fix FTBFS on + kfreebsd-* during the rebuild for the unannounced freebsd-libs + transition, due to hardening options (-Werror=format-security): + 55-kfreebsd-format-security.patch (Closes: #660400) + * Set urgency to “high” for the RC bug fix. + + -- Cyril Brulebois <kibi@debian.org> Sun, 19 Feb 2012 04:22:09 +0000 + hal (0.5.14-7) unstable; urgency=low * debian/control diff -Nru hal-0.5.14/debian/patches/55-kfreebsd-format-security.patch hal-0.5.14/debian/patches/55-kfreebsd-format-security.patch --- hal-0.5.14/debian/patches/55-kfreebsd-format-security.patch 1970-01-01 00:00:00.000000000 +0000 +++ hal-0.5.14/debian/patches/55-kfreebsd-format-security.patch 2012-02-19 04:24:52.000000000 +0000 @@ -0,0 +1,39 @@ +Description: fixes for -Wformat-security in FreeBSD-specific code +Author: Steven Chamberlain <steven@pyro.eu.org> +Bug-Debian: http://bugs.debian.org/660400 + +Index: hal-0.5.14/hald/freebsd/hf-acpi.c +=================================================================== +--- hal-0.5.14.orig/hald/freebsd/hf-acpi.c 2012-02-19 03:28:06.000000000 +0000 ++++ hal-0.5.14/hald/freebsd/hf-acpi.c 2012-02-19 03:29:18.000000000 +0000 +@@ -520,7 +520,7 @@ + + g_return_val_if_fail(HAL_IS_DEVICE(parent), NULL); + +- if (get_sysctl == NULL || ! hf_has_sysctl(get_sysctl)) ++ if (get_sysctl == NULL || ! hf_has_sysctl("%s", get_sysctl)) + return NULL; + device = hf_device_new(parent); + +@@ -536,7 +536,7 @@ + { + int bmax; + +- if (hf_get_int_sysctl(&bmax, NULL, max_sysctl)) ++ if (hf_get_int_sysctl(&bmax, NULL, "%s", max_sysctl)) + hal_device_property_set_int(device, "laptop_panel.num_levels", bmax); + else + hal_device_property_set_int(device, "laptop_panel.num_levels", max_levels); +Index: hal-0.5.14/hald/freebsd/hf-devtree.c +=================================================================== +--- hal-0.5.14.orig/hald/freebsd/hf-devtree.c 2012-02-19 03:33:18.000000000 +0000 ++++ hal-0.5.14/hald/freebsd/hf-devtree.c 2012-02-19 03:33:49.000000000 +0000 +@@ -556,7 +556,7 @@ + + devfile = g_strdup_printf("/dev/%s%i", driver, unit); + if (g_file_test(devfile, G_FILE_TEST_EXISTS)) +- hf_device_property_set_string_printf(device, "freebsd.device_file", devfile); ++ hf_device_property_set_string_printf(device, "freebsd.device_file", "%s", devfile); + g_free(devfile); + } + diff -Nru hal-0.5.14/debian/patches/series hal-0.5.14/debian/patches/series --- hal-0.5.14/debian/patches/series 2011-08-12 13:47:11.000000000 +0000 +++ hal-0.5.14/debian/patches/series 2012-02-19 04:25:11.000000000 +0000 @@ -13,4 +13,5 @@ 52-kfreebsd-libufs.patch 53-kfreebsd-blkid.patch 54-kfreebsd-libusb2.patch +55-kfreebsd-format-security.patch 60-create-run-hald-directory.patch
Attachment:
signature.asc
Description: Digital signature