[PATCH 1/5] lib/mpi: mpi_read_from_buffer(): return error code

2016-05-26 Thread Nicolai Stange
mpi_read_from_buffer() reads a MPI from a buffer into a newly allocated MPI instance. It expects the buffer's leading two bytes to contain the number of bits, followed by the actual payload. On failure, it returns NULL and updates the in/out argument ret_nread somewhat inconsistently: - If the

[PATCH 1/5] lib/mpi: mpi_read_from_buffer(): return error code

2016-05-26 Thread Nicolai Stange
mpi_read_from_buffer() reads a MPI from a buffer into a newly allocated MPI instance. It expects the buffer's leading two bytes to contain the number of bits, followed by the actual payload. On failure, it returns NULL and updates the in/out argument ret_nread somewhat inconsistently: - If the