diff options
author | Richard Carlsson <[email protected]> | 2015-12-03 14:33:53 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-02-08 16:11:56 +0100 |
commit | 14680fcc3fb9d0357fe33a94525d08896afed1c5 (patch) | |
tree | 40b1891cdbe478154d62262616494dbc27eabcf1 /erts/emulator/beam/global.h | |
parent | acc4ac9f421e064bc0e573a9d5ecd26afe7cb8d6 (diff) | |
download | otp-14680fcc3fb9d0357fe33a94525d08896afed1c5.tar.gz otp-14680fcc3fb9d0357fe33a94525d08896afed1c5.tar.bz2 otp-14680fcc3fb9d0357fe33a94525d08896afed1c5.zip |
erts: Use Sint instead of int for list lengths
This avoids potential integer arithmetic overflow for very large lists.
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r-- | erts/emulator/beam/global.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h index e8a7573e86..628f36a35e 100644 --- a/erts/emulator/beam/global.h +++ b/erts/emulator/beam/global.h @@ -1308,7 +1308,7 @@ int erts_utf8_to_latin1(byte* dest, const byte* source, int slen); #define ERTS_UTF8_OK_MAX_CHARS 4 void bin_write(int, void*, byte*, size_t); -int intlist_to_buf(Eterm, char*, int); /* most callers pass plain char*'s */ +Sint intlist_to_buf(Eterm, char*, Sint); /* most callers pass plain char*'s */ struct Sint_buf { #if defined(ARCH_64) @@ -1381,7 +1381,7 @@ ErlDrvSizeT erts_iolist_to_buf(Eterm, char*, ErlDrvSizeT); ErlDrvSizeT erts_iolist_to_buf_yielding(ErtsIOList2BufState *); int erts_iolist_size_yielding(ErtsIOListState *state); int erts_iolist_size(Eterm, ErlDrvSizeT *); -int is_string(Eterm); +Sint is_string(Eterm); void erl_at_exit(void (*) (void*), void*); Eterm collect_memory(Process *); void dump_memory_to_fd(int); |