diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2021-05-19 09:04:45 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2021-05-19 09:04:45 +0100 |
commit | 5f7ff732fa7c7299c365b283a62d0154899f49db (patch) | |
tree | 51ecb7a3e33672f313010ec996b56aad9c9be2b5 /format.c | |
parent | 83024f57a6dcad690da5bdd559df07ef10d44ccd (diff) | |
download | rtmux-5f7ff732fa7c7299c365b283a62d0154899f49db.tar.gz rtmux-5f7ff732fa7c7299c365b283a62d0154899f49db.tar.bz2 rtmux-5f7ff732fa7c7299c365b283a62d0154899f49db.zip |
Bump FORMAT_LOOOP_LIMIT and add a log message when hit, GitHub issue 2715.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -103,7 +103,7 @@ format_job_cmp(struct format_job *fj1, struct format_job *fj2) #define FORMAT_CHARACTER 0x10000 /* Limit on recursion. */ -#define FORMAT_LOOP_LIMIT 10 +#define FORMAT_LOOP_LIMIT 100 /* Format expand flags. */ #define FORMAT_EXPAND_TIME 0x1 @@ -4441,8 +4441,10 @@ format_expand1(struct format_expand_state *es, const char *fmt) if (fmt == NULL || *fmt == '\0') return (xstrdup("")); - if (es->loop == FORMAT_LOOP_LIMIT) + if (es->loop == FORMAT_LOOP_LIMIT) { + format_log(es, "reached loop limit (%u)", FORMAT_LOOP_LIMIT); return (xstrdup("")); + } es->loop++; format_log(es, "expanding format: %s", fmt); |