diff options
author | Grigori Goronzy <greg@blackbox> | 2010-02-06 04:11:53 +0100 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2010-02-06 04:11:53 +0100 |
commit | 7fa4c5e2f0a0e131814c32f414435af32818ab85 (patch) | |
tree | 1827ef5059b49a4dacd22989885534184c8a7c6c /libass/ass.c | |
parent | a50d19df54579bc4b3c54705167c2b9d49ee32c0 (diff) | |
download | libass-7fa4c5e2f0a0e131814c32f414435af32818ab85.tar.bz2 libass-7fa4c5e2f0a0e131814c32f414435af32818ab85.tar.xz |
Remove file size limit in ass_read_file
If an application wants to provide some sort of safeguard against
loading very big files (which can trash memory), it should do so by
itself.
Diffstat (limited to 'libass/ass.c')
-rw-r--r-- | libass/ass.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/libass/ass.c b/libass/ass.c index fd63d96..1411776 100644 --- a/libass/ass.c +++ b/libass/ass.c @@ -58,7 +58,6 @@ 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) { @@ -1022,14 +1021,6 @@ static char *read_file(ASS_Library *library, char *fname, size_t *bufsize) sz = ftell(fp); rewind(fp); - if (sz > ASS_MAX_FILESIZE) { - ass_msg(library, MSGL_INFO, - "ass_read_file(%s): Refusing to load subtitles " - "larger than %d bytes", fname, ASS_MAX_FILESIZE); - fclose(fp); - return 0; - } - ass_msg(library, MSGL_V, "File size: %ld", sz); buf = malloc(sz + 1); |