]> git.sesse.net Git - ffmpeg/commit
vf_unsharp: fix out-of-buffer read
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Fri, 12 Aug 2011 06:42:35 +0000 (08:42 +0200)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Sun, 14 Aug 2011 14:28:54 +0000 (16:28 +0200)
commit63b61d55f9592e61cc8f7d973482c1120e0dc987
treedd5ffb0476aa25a65cc9e52843c15fe5b126560e
parent6e89bdfecf723d642fe52180af25918c3bd762a2
vf_unsharp: fix out-of-buffer read

In apply_unsharp(), when y is >= height, prevent out-of-buffer reading
from src, read from the last buffer line in src2 instead.

The check was implemented in the original unsharp libmpcodecs code and
lost in the port.

This also fixes output discrepancy between the two filters.
libavfilter/vf_unsharp.c