]> granicus.if.org Git - handbrake/commitdiff
libhb: fix access to uninitialized variables in hb_set_anamorphic_size2
authorjstebbins <jstebbins.hb@gmail.com>
Sat, 3 Jan 2015 16:03:39 +0000 (16:03 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Sat, 3 Jan 2015 16:03:39 +0000 (16:03 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6682 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/common.c

index 7f12e5838d33e1e8982259b8618ab3a2feb62f31..50e52734c56d7009bb19e8b35cd221130c29524b 100644 (file)
@@ -2998,6 +2998,7 @@ static void job_setup(hb_job_t * job, hb_title_t * title)
     hb_geometry_t resultGeo, srcGeo;
     hb_geometry_settings_t uiGeo;
 
+    memset(&uiGeo, 0, sizeof(uiGeo));
     srcGeo.width = title->geometry.width;
     srcGeo.height = title->geometry.height;
     srcGeo.par = title->geometry.par;
@@ -3005,9 +3006,8 @@ static void job_setup(hb_job_t * job, hb_title_t * title)
     uiGeo.geometry.width = job->width;
     uiGeo.geometry.height = job->height;
     uiGeo.geometry.par = job->par;
-    uiGeo.mode = 0;
+    uiGeo.mode = HB_ANAMORPHIC_NONE;
     uiGeo.keep = HB_KEEP_DISPLAY_ASPECT;
-    uiGeo.itu_par = 0;
 
     hb_set_anamorphic_size2(&srcGeo, &uiGeo, &resultGeo);
     job->width = resultGeo.width;