summaryrefslogtreecommitdiffstats
path: root/macosx/HBJob.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-06-08 16:20:43 +0200
committerDamiano Galassi <[email protected]>2019-06-08 16:20:43 +0200
commitc36996ced365c839b01c5297d799ba79f1e05299 (patch)
treeb584d6a570d36def3f07ef7a4e8f7ae36ac0f64c /macosx/HBJob.m
parent908b78452f8e53b5a9de3a592949eb30b21a5ec5 (diff)
MacGui: write the queue to disk less often and add some validations when reading it back from disk.
Diffstat (limited to 'macosx/HBJob.m')
-rw-r--r--macosx/HBJob.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/macosx/HBJob.m b/macosx/HBJob.m
index ce7f9f586..7cd7c7fcf 100644
--- a/macosx/HBJob.m
+++ b/macosx/HBJob.m
@@ -426,7 +426,7 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
{
decodeObjectOrFail(_name, NSString);
decodeObjectOrFail(_presetName, NSString);
- decodeInt(_titleIdx);
+ decodeInt(_titleIdx); if (_titleIdx < 0) { goto fail; }
#ifdef __SANDBOX_ENABLED__
_fileURLBookmark = [decoder decodeObjectOfClass:[NSData class] forKey:@"_fileURLBookmark"];
@@ -459,8 +459,8 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
decodeObject(_outputFileName, NSString);
- decodeInt(_container);
- decodeInt(_angle);
+ decodeInt(_container); if (_container != HB_MUX_MP4 && _container != HB_MUX_MKV && _container != HB_MUX_WEBM) { goto fail; }
+ decodeInt(_angle); if (_angle < 0) { goto fail; }
decodeBool(_mp4HttpOptimize);
decodeBool(_mp4iPodCompatible);
decodeBool(_alignAVStart);