Hello community, here is the log from the commit of package gcab for openSUSE:Factory checked in at 2015-03-27 09:38:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gcab (Old) and /work/SRC/openSUSE:Factory/.gcab.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gcab" Changes: -------- --- /work/SRC/openSUSE:Factory/gcab/gcab.changes 2015-03-11 09:58:45.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.gcab.new/gcab.changes 2015-03-27 09:38:45.000000000 +0100 @@ -1,0 +2,5 @@ +Sat Mar 21 16:48:27 UTC 2015 - sch...@linux-m68k.org + +- Add gcab-checksum.patch: fix checksum computation (bgo#746580). + +------------------------------------------------------------------- New: ---- gcab-checksum.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gcab.spec ++++++ --- /var/tmp/diff_new_pack.2coLat/_old 2015-03-27 09:38:45.000000000 +0100 +++ /var/tmp/diff_new_pack.2coLat/_new 2015-03-27 09:38:45.000000000 +0100 @@ -24,6 +24,8 @@ Group: Productivity/Archiving/Compression Url: http://ftp.gnome.org/pub/GNOME/sources/gcab Source: http://ftp.acc.umu.se/pub/GNOME/sources/gcab/0.5/gcab-0.5.tar.xz +# PATCH-FIX-UPSTREAM gcab-checksum.patch bgo#746580 sch...@linux-m68k.org -- Fix checksum computation +Patch: gcab-checksum.patch BuildRequires: gobject-introspection >= 0.9.4 BuildRequires: intltool >= 0.40.0 BuildRequires: vala >= 0.14 @@ -66,6 +68,7 @@ %lang_package %prep %setup -q +%patch -p1 %build %configure \ ++++++ gcab-checksum.patch ++++++ Index: gcab-0.5/libgcab/cabinet.c =================================================================== --- gcab-0.5.orig/libgcab/cabinet.c +++ gcab-0.5/libgcab/cabinet.c @@ -403,7 +403,12 @@ cdata_write (cdata_t *cd, GDataOutputStr return FALSE; CHECKSUM datacsum = compute_checksum(cd->in, cd->ncbytes, 0); - cd->checksum = compute_checksum ((guint8*)&cd->ncbytes, 4, datacsum); + guint8 tmp[4]; + tmp[0] = cd->ncbytes & 0xff; + tmp[1] = (cd->ncbytes >> 8) & 0xff; + tmp[2] = cd->nubytes & 0xff; + tmp[3] = (cd->nubytes >> 8) & 0xff; + cd->checksum = compute_checksum (tmp, 4, datacsum); GOutputStream *stream = g_filter_output_stream_get_base_stream (G_FILTER_OUTPUT_STREAM (out)); *bytes_written = 0; @@ -462,7 +467,12 @@ cdata_read (cdata_t *cd, u1 res_data, gi RN (buf, cd->ncbytes); datacsum = compute_checksum(buf, cd->ncbytes, 0); - g_return_val_if_fail (cd->checksum == compute_checksum ((guint8*)&cd->ncbytes, 4, datacsum), FALSE); + guint8 tmp[4]; + tmp[0] = cd->ncbytes & 0xff; + tmp[1] = (cd->ncbytes >> 8) & 0xff; + tmp[2] = cd->nubytes & 0xff; + tmp[3] = (cd->nubytes >> 8) & 0xff; + g_return_val_if_fail (cd->checksum == compute_checksum (tmp, 4, datacsum), FALSE); if (g_getenv ("GCAB_DEBUG")) { g_debug ("CDATA"); -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org