File: 05-fix-rndplay-segfault.patch

package info (click to toggle)
cdcd 0.6.6-13.3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,768 kB
  • sloc: ansic: 4,891; sh: 2,142; makefile: 17
file content (17 lines) | stat: -rw-r--r-- 545 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Author: Zak B. Elep <zakame@zakame.net>
Description: Fix 'cdcd rndplay' segfault if no CD is in the drive.
http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=17;filename=cmd_cdcd.c_diff;att=1;bug=466920

--- a/cmd_cdcd.c	2011-06-26 15:03:10.000000000 +0200
+++ b/cmd_cdcd.c	2011-06-26 15:04:56.000000000 +0200
@@ -614,8 +614,8 @@
 {
   struct disc_info disc;
   NOARG;
-  if (cd_stat (cd_desc, &disc) != 0)
-    return XRET_NULL;
+  if (cdcd_cd_stat (cd_desc, &disc) < 0)
+    return 0;
 
   play_track = (rand () % disc.disc_total_tracks) + 1;