read_packages( SSL ): - buff_ptr[bytes_read] = 0 results in Invalid write of size 1 - tot_bytes was calculated wrongly (as rc=0 in last call of SSL_read) (this created all kind of errors like "malloc(): invalid size (unsorted)", "corrupted size vs. prev_size" or segfaults in printf of the message buffer)
Signed-off-by: Andreas Baumann <mail@andreasbaumann.cc>