External, Non-PPA KXStudio Repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
928B

  1. From: Daniel Exner <dex@dragonslave.de>
  2. Date: Mon, 18 Jun 2012 22:05:48 +0200
  3. Subject: Avoid SIGFPE when bytespersample is zero
  4. Forwarded: https://github.com/xiph/vorbis/pull/66
  5. Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=635906#15
  6. Reviewed-By: Petter Reinholdtsen <pere@hungry.com>
  7. Last-Update: 2020-08-24
  8. ---
  9. lib/vorbisfile.c | 3 ++-
  10. 1 file changed, 2 insertions(+), 1 deletion(-)
  11. Index: libvorbis/lib/vorbisfile.c
  12. ===================================================================
  13. --- libvorbis.orig/lib/vorbisfile.c
  14. +++ libvorbis/lib/vorbisfile.c
  15. @@ -1992,7 +1992,8 @@ long ov_read_filter(OggVorbis_File *vf,c
  16. vorbis_fpu_control fpu;
  17. if(channels<1||channels>255)return(OV_EINVAL);
  18. - if(samples>length/bytespersample)samples=length/bytespersample;
  19. + if(bytespersample && samples>length/bytespersample)
  20. + samples=length/bytespersample;
  21. if(samples <= 0)
  22. return OV_EINVAL;