There is no way to make clang's "argument unused" warning fatal.
Ideally the search string would also include 'clang: ' but this output might
depend on clang's argv[0].
IMO 'new' should be dropped entirely since it's not optional and 'new' is the only choice.
If it were to change in future then it should go after all the options.
(closes#111)
Recent ncurses can be configured --with-termlib, which splits out the
terminfo-level functions from libncurses into a separate libtinfo.
This allows us to avoid an unnecessary dependency on libncurses. (We
already avoided this on distributions that link with -Wl,--as-needed.)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Closes#128 github pull request.
performed and FreeBSD (at least) implements thin behaviour. Add an
explicit test to detect this situation in Dispatcher::parse_params().
(This behaviour difference is not relevant to other uses of strtol()).
This corrects the mishandling of (eg) "CSI m" on FreeBSD.
Closes#129 github pull request.
[keithw -- also fixes same issue with mosh-server on OS X]
AC_MSG_ERROR inside the variable assignment doesn't work properly. We get
output like
checking for protoc... ./configure: line 4524: is: command not found
no
and then the build continues (and fails) with PROTOC="".
Closes#132 github pull request.
This tests cryptographic primitives implemented by others. It uses the same
interfaces and indeed the same compiled object code as the Mosh client and
server. It does not particularly test any code written for the Mosh project.
Instead of guessing the right function to use, we malloc() 15 bytes more than
we need, and compute the aligned offset within. The AlignedBuffer class takes
care of passing the original pointer to free().
This simplifies the core crypto routines, especially the error handling. In
fact there was already one error path where we were failing to call free().
"Both the privacy and the authenticity properties of OCB degrade as
per s^2 / 2^128, where s is the total number of blocks that the
adversary acquires.... In order to ensure that s^2 / 2^128 remains
small, a given key should be used to encrypt at most 2^48 blocks (2^55
bits or 4 petabytes)"
-- http://tools.ietf.org/html/draft-krovetz-ocb-03
We deem it unlikely that a legitimate user will send 4 PB through a Mosh
session. If it happens, we simply kill the session. The server and
client use the same key, so we actually need to die after 2^47 blocks.
Closes#77.
struct winsize contains fields other than ws_col and ws_row. To avoid passing
uninitialized data to TIOCSWINSZ, initialize it first using TIOCGWINSZ.
Found by Valgrind.
(closes#85 github issue)