On Wed, Jan 08, 2014 at 12:33:48PM +0100, Jacob Erlbeck wrote:
I think we
should do the memset before the first encode/decode as well.
Do you mind if I update the patch for that?
The data that is written to 'coded' by gsm_7bit_encode() is not checked
so initialising it wouldn't change anything since it will not been read
before the existing memset(). So I would only add it when the encoded
data is verified, too. This would mean using gsm_7bit_encode_oct()
instead of gsm_7bit_encode() and copying the OSME_ASSERT with the call
to memcmp().
Okay. the question then is if we should look at the result of the encode
function and I remember that you have asked me the question. Yes, we can
assume that the old and 'n' function provide the same result. I am applying
your change now.
holger