1From c760c5d31f2412a5be5ac6896e6069d1cea08527 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 26 Jun 2017 22:31:45 -0700
4Subject: [PATCH 1/2] check for null buffer before trying a byteswap
5
6Author: Monty <paranoia@xiph.org>
7
8Patch from debian
9http://sources.debian.net/src/cdparanoia/3.10.2%2Bdebian-11/debian/patches/04-endian.patch
10
11Upstream-Status: Pending
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 interface/interface.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/interface/interface.c b/interface/interface.c
18index 526c2a9..763a0ea 100644
19--- a/interface/interface.c
20+++ b/interface/interface.c
21@@ -118,7 +118,7 @@ long cdda_read_timed(cdrom_drive *d, void *buffer, long beginsector, long sector
22 	if(d->bigendianp==-1) /* not determined yet */
23 	  d->bigendianp=data_bigendianp(d);
24
25-	if(d->bigendianp!=bigendianp()){
26+	if(buffer && d->bigendianp!=bigendianp()){
27 	  int i;
28 	  u_int16_t *p=(u_int16_t *)buffer;
29 	  long els=sectors*CD_FRAMESIZE_RAW/2;
30--
312.13.2
32
33