[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Update of clamz



OoO  Pendant le  journal télévisé  du  mercredi 09  novembre 2011,  vers
20:46, "Adam D. Barratt" <adam@adam-barratt.org.uk> disait :

>> My question is:  can I upload clamz 0.5 to  proposed-updates or should I
>> backport the  change to clamz  0.4 (only the modification  to playlist.c
>> plus the URL change to enable MP3 downloader)?

> Thanks for working on fixing this issue in stable.

> As a rule of thumb, a minimal change is always preferred.  In this case
> the configure.ac changes may be cosmetic, but they're not required in
> order to fix a bug (at least afaict, please correct me if I missed
> something) and are a modification to the build system, which generally
> isn't appropriate for a stable update.

> Please prepare an updated package including the changes you mentioned
> above and send a debdiff to -release for final approval; thanks.

Hi!

Here is the debdiff:

diff -Nru clamz-0.4/debian/changelog clamz-0.4/debian/changelog
--- clamz-0.4/debian/changelog	2010-06-04 17:04:02.000000000 +0200
+++ clamz-0.4/debian/changelog	2011-11-12 09:26:39.000000000 +0100
@@ -1,3 +1,10 @@
+clamz (0.4-2+squeeze1) stable; urgency=low
+
+  * Handle unencrypted AMZ files that are now distributed by Amazon.
+    Closes: #647043.
+
+ -- Vincent Bernat <bernat@debian.org>  Sat, 12 Nov 2011 09:09:26 +0100
+
 clamz (0.4-2) unstable; urgency=low
 
   * debian/watch
diff -Nru clamz-0.4/debian/patches/handle-unencrypted-amz.patch clamz-0.4/debian/patches/handle-unencrypted-amz.patch
--- clamz-0.4/debian/patches/handle-unencrypted-amz.patch	1970-01-01 01:00:00.000000000 +0100
+++ clamz-0.4/debian/patches/handle-unencrypted-amz.patch	2011-11-12 09:26:39.000000000 +0100
@@ -0,0 +1,32 @@
+Handle unencrypted AMZ. Closes: #647043
+ 
+diff --git a/playlist.c b/playlist.c
+index be37c1a..9fdcccc 100644
+--- a/playlist.c
++++ b/playlist.c
+@@ -423,6 +423,25 @@ unsigned char *decrypt_amz_file(const char *b64data,
+   unsigned long unpacked_len;
+   unsigned long i;
+ 
++  /* Some AMZ files are encrypted (and base64-encoded), while others
++     are just plain XML.  Check if the start of the file looks like
++     XML */
++  i = 0;
++  while (i < b64len && (b64data[i] <= ' ' || b64data[i] > '~'))
++    i++;
++
++  if (i < b64len && b64data[i] == '<') {
++    /* assume file is not encrypted */
++    decrypted = malloc(b64len + 1);
++    if (!decrypted) {
++      print_error("Out of memory");
++      return NULL;
++    }
++    memcpy(decrypted, b64data, b64len);
++    decrypted[b64len] = 0;
++    return decrypted;
++  }
++
+   unpacked = base64_decode(&unpacked_len, b64data, b64len, fname);
+   if (!unpacked)
+     return NULL;
diff -Nru clamz-0.4/debian/patches/series clamz-0.4/debian/patches/series
--- clamz-0.4/debian/patches/series	2010-05-31 18:59:45.000000000 +0200
+++ clamz-0.4/debian/patches/series	2011-11-12 09:26:39.000000000 +0100
@@ -1 +1,2 @@
 fix-clamz-desktop.patch
+handle-unencrypted-amz.patch
-- 
Vincent Bernat ☯ http://vincent.bernat.im

Modularise.  Use subroutines.
            - The Elements of Programming Style (Kernighan & Plauger)

Attachment: pgpBZbrWYVULT.pgp
Description: PGP signature


Reply to: