From 7c2bc5e889a44a029fd4eb8ad7ff7ca583c3a2f4 Mon Sep 17 00:00:00 2001 From: rocky Date: Fri, 7 Jan 2005 02:40:57 +0000 Subject: [PATCH] Initialize buff in case read doesn't do it. (But I'm no sure why the read isn't doing this properly.) --- lib/cdda_interface/common_interface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cdda_interface/common_interface.c b/lib/cdda_interface/common_interface.c index c26e6ae5..1fca04ce 100644 --- a/lib/cdda_interface/common_interface.c +++ b/lib/cdda_interface/common_interface.c @@ -1,5 +1,5 @@ /* - $Id: common_interface.c,v 1.4 2005/01/06 03:09:11 rocky Exp $ + $Id: common_interface.c,v 1.5 2005/01/07 02:40:57 rocky Exp $ Copyright (C) 2004 Rocky Bernstein Copyright (C) 1998, 2002 Monty monty@xiph.org @@ -44,6 +44,8 @@ data_bigendianp(cdrom_drive_t *d) long readsectors=5; int16_t *buff=malloc(readsectors*CDIO_CD_FRAMESIZE_RAW); + memset(buff, 0, readsectors*CDIO_CD_FRAMESIZE_RAW); + /* look at the starts of the audio tracks */ /* if real silence, tool in until some static is found */