diff options
author | Lukas Larsson <[email protected]> | 2019-01-09 15:34:57 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2019-02-05 14:40:46 +0100 |
commit | bcb79fa612454012db31b1404940caea209ffeec (patch) | |
tree | 4c29512ae760f87f0930fd5c5e806fb6a800f43d | |
parent | 6c7c3a1660fdb4e929a2f60e026edf9585a6a2bb (diff) | |
download | otp-bcb79fa612454012db31b1404940caea209ffeec.tar.gz otp-bcb79fa612454012db31b1404940caea209ffeec.tar.bz2 otp-bcb79fa612454012db31b1404940caea209ffeec.zip |
erts: Limit binary printout for %.XT in erts_print
-rw-r--r-- | erts/emulator/beam/erl_printf_term.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_printf_term.c b/erts/emulator/beam/erl_printf_term.c index 9cfb7fc681..2e33a8a782 100644 --- a/erts/emulator/beam/erl_printf_term.c +++ b/erts/emulator/beam/erl_printf_term.c @@ -487,6 +487,8 @@ print_term(fmtfn_t fn, void* arg, Eterm obj, long *dcount) { PRINT_UWORD(res, fn, arg, 'u', 0, 1, octet); ++bytep; --bytesize; + if ((*dcount)-- <= 0) + goto L_done; } if (bitsize) { Uint bits = bitoffs + bitsize; @@ -521,6 +523,8 @@ print_term(fmtfn_t fn, void* arg, Eterm obj, long *dcount) { PRINT_CHAR(res, fn, arg, octet); ++bytep; --bytesize; + if ((*dcount)-- <= 0) + goto L_done; } PRINT_STRING(res, fn, arg, "\">>"); } |