[SCM] libav/experimental: Fix segfault with non existing input files.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:25:56 UTC 2013
The following commit has been merged in the experimental branch:
commit e740c796d801d38eaaddfd337a18cfd0df8a5756
Author: Michael Niedermayer <michaelni at gmx.at>
Date: Thu Jul 24 15:47:28 2008 +0000
Fix segfault with non existing input files.
Originally committed as revision 14369 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/tests/tiny_psnr.c b/tests/tiny_psnr.c
index 31a7a1b..7a83dd5 100644
--- a/tests/tiny_psnr.c
+++ b/tests/tiny_psnr.c
@@ -120,6 +120,10 @@ int main(int argc,char* argv[]){
f[0]= fopen(argv[1], "rb");
f[1]= fopen(argv[2], "rb");
+ if(!f[0] || !f[1]){
+ fprintf(stderr, "couldnt open input files\n");
+ return -1;
+ }
fseek(f[shift<0], shift < 0 ? -shift : shift, SEEK_SET);
fseek(f[0],skip_bytes,SEEK_CUR);
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list