]> granicus.if.org Git - handbrake/commitdiff
MacGui: sanitise modulus values.
authorDamiano Galassi <damiog@gmail.com>
Sun, 6 Aug 2017 16:36:14 +0000 (18:36 +0200)
committerDamiano Galassi <damiog@gmail.com>
Sun, 6 Aug 2017 16:36:14 +0000 (18:36 +0200)
macosx/HBPicture.m

index 5578245e4d770b2e6c1160590057e524372c30cf..74c582509438a6696c4fc818849e1c6e654fb1a9 100644 (file)
@@ -725,6 +725,11 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification";
             self.modulus = 16;
         }
 
+        if (self.modulus <= 0 || self.modulus > 16)
+        {
+            self.modulus = 2;
+        }
+
         // Assume max picture settings initially.
         self.keepDisplayAspect = [preset[@"PictureKeepRatio"] boolValue];