summaryrefslogtreecommitdiffstats
path: root/libhb/common.h
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2015-10-21 14:41:54 -0700
committerJohn Stebbins <[email protected]>2015-10-26 08:32:38 -0700
commita0c3d9592025c9cdd59ce2e635d3fc689ba5437d (patch)
tree9d57335f19bad2349a2998edf94b43850c30d2e8 /libhb/common.h
parentfc25d9a913d485e6bd3caf1ef1115fc6d24c39e6 (diff)
Enforce min/max dimensions
In both hb_set_anamorphic_size and hb_get_preview, check that image dimensions are > 32x32 and < 10240x10240. This should help to prevent crashes with unusual dimensions settings.
Diffstat (limited to 'libhb/common.h')
-rw-r--r--libhb/common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libhb/common.h b/libhb/common.h
index 6811e1eca..4d377f8f1 100644
--- a/libhb/common.h
+++ b/libhb/common.h
@@ -72,6 +72,11 @@
#define HB_DVD_READ_BUFFER_SIZE 2048
+#define HB_MIN_WIDTH 32
+#define HB_MIN_HEIGHT 32
+#define HB_MAX_WIDTH 10240
+#define HB_MAX_HEIGHT 10240
+
typedef struct hb_handle_s hb_handle_t;
typedef struct hb_hwd_s hb_hwd_t;
typedef struct hb_list_s hb_list_t;