From d9a3138d137298af6641e83cc62ab272f359fcab Mon Sep 17 00:00:00 2001 From: Monty Date: Tue, 30 Jan 2018 13:51:00 +0900 Subject: [PATCH] Changeset 15356: Fix a really stupid oversight that should have been tested: forcing a drive/host endian mismatch within the interface lib. Does not check for null buff before trying a byteswap (Closes: #499716, #506337, #507795, #509762). Gbp-Pq: Name 04-endian.patch --- interface/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/interface.c b/interface/interface.c index cce83a4..30bffb0 100644 --- a/interface/interface.c +++ b/interface/interface.c @@ -118,7 +118,7 @@ long cdda_read_timed(cdrom_drive *d, void *buffer, long beginsector, long sector if(d->bigendianp==-1) /* not determined yet */ d->bigendianp=data_bigendianp(d); - if(d->bigendianp!=bigendianp()){ + if(buffer && d->bigendianp!=bigendianp()){ int i; u_int16_t *p=(u_int16_t *)buffer; long els=sectors*CD_FRAMESIZE_RAW/2;