From 61c3d766889c79e3d3b95e8eb3da8638a2eccbd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 6 May 2011 14:55:13 +0200 Subject: Make port_command/2 reject non-byte sized bitstrings Also rename the fun_to_port/1 test case to outputv_errors/1 and test sending more kinds of bad data to an outputv-enabled driver. --- erts/emulator/beam/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/emulator/beam') diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index 3610a06c0c..bf49417c3f 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -957,7 +957,7 @@ do { \ int _bitoffs; \ int _bitsize; \ ERTS_GET_REAL_BIN(obj, _real, _offset, _bitoffs, _bitsize); \ - ASSERT(_bitsize == 0); \ + if (_bitsize != 0) goto L_type_error; \ if (thing_subtag(*binary_val(_real)) == REFC_BINARY_SUBTAG && \ _bitoffs == 0) { \ b_size += _size; \ -- cgit v1.2.3