pictor: Correctly check frame dimensions

Fixes: 559/clusterfuzz-testcase-6424225917173760
Bug-Id: CVE-2017-7862
CC: libav-stable@libav.org

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8c2ea3030af7b40a3c4275696fb5c76cdb80950a)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
