Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > c0e2985724eace480e7bac64070b242c > files > 14

libsndfile-1.0.25-9.4.mga5.src.rpm

---
 src/common.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/src/common.c
+++ b/src/common.c
@@ -800,9 +800,10 @@ header_read (SF_PRIVATE *psf, void *ptr,
 	if (psf->headindex + bytes > SIGNED_SIZEOF (psf->header))
 	{	int most ;
 
-		most = SIGNED_SIZEOF (psf->header) - psf->headindex ;
+		most = SIGNED_SIZEOF (psf->header) - psf->headend ;
 		psf_fread (psf->header + psf->headend, 1, most, psf) ;
-		memcpy (ptr, psf->header + psf->headend, most) ;
+		most = SIGNED_SIZEOF (psf->header) - psf->headindex ;
+		memcpy (ptr, psf->header + psf->headindex, most) ;
 		psf->headend = psf->headindex += most ;
 		psf_fread ((char *) ptr + most, bytes - most, 1, psf) ;
 		return bytes ;