summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libass/ass.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libass/ass.c b/libass/ass.c
index 5f49a19..fd63d96 100644
--- a/libass/ass.c
+++ b/libass/ass.c
@@ -58,6 +58,7 @@ struct parser_priv {
#define ASS_STYLES_ALLOC 20
#define ASS_EVENTS_ALLOC 200
+#define ASS_MAX_FILESIZE 50 * 1048576
void ass_free_track(ASS_Track *track)
{
@@ -1021,10 +1022,10 @@ static char *read_file(ASS_Library *library, char *fname, size_t *bufsize)
sz = ftell(fp);
rewind(fp);
- if (sz > 10 * 1024 * 1024) {
+ if (sz > ASS_MAX_FILESIZE) {
ass_msg(library, MSGL_INFO,
"ass_read_file(%s): Refusing to load subtitles "
- "larger than 10MiB", fname);
+ "larger than %d bytes", fname, ASS_MAX_FILESIZE);
fclose(fp);
return 0;
}