aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/bif.c
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2018-03-12 11:38:30 +0100
committerJohn Högberg <[email protected]>2018-03-12 11:38:30 +0100
commit2960c7d08932b718dc93773e0718cd214277e09d (patch)
tree93e755c0f61d3ba73fe0d3c866e23355a82059ca /erts/emulator/beam/bif.c
parent0217dbfee505ed8c88164c7a4ea5e1834e6ce8cd (diff)
parent4d4629605ab7d3c3a5268502dadcf639151d6c42 (diff)
downloadotp-2960c7d08932b718dc93773e0718cd214277e09d.tar.gz
otp-2960c7d08932b718dc93773e0718cd214277e09d.tar.bz2
otp-2960c7d08932b718dc93773e0718cd214277e09d.zip
Merge branch 'john/erts/assert-on-memcpy-memset-etc'
* john/erts/assert-on-memcpy-memset-etc: Always use sys_memcpy/cmp/etc instead of plain memcpy/cmp/etc Check the arguments to sys_memcpy and friends
Diffstat (limited to 'erts/emulator/beam/bif.c')
-rw-r--r--erts/emulator/beam/bif.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index bfd572335f..5a98cb827c 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -3465,7 +3465,7 @@ BIF_RETTYPE binary_to_float_1(BIF_ALIST_1)
if (bit_offs)
erts_copy_bits(bytes, bit_offs, 1, buf, 0, 1, size*8);
else
- memcpy(buf, bytes, size);
+ sys_memcpy(buf, bytes, size);
buf[size] = '\0';
@@ -4199,10 +4199,10 @@ BIF_RETTYPE list_to_port_1(BIF_ALIST_1)
buf[i] = '\0'; /* null terminal */
cp = &buf[0];
- if (strncmp("#Port<", cp, 6) != 0)
+ if (sys_strncmp("#Port<", cp, 6) != 0)
goto bad;
- cp += 6; /* strlen("#Port<") */
+ cp += 6; /* sys_strlen("#Port<") */
if (sscanf(cp, "%u.%u>", (unsigned int*)&n, (unsigned int*)&p) < 2)
goto bad;