diff --git a/src/simutil.c b/src/simutil.c index 6e7051ed..d5fc06bf 100644 --- a/src/simutil.c +++ b/src/simutil.c @@ -1628,9 +1628,10 @@ static int build_authenticate(unsigned char *buffer, const unsigned char *rand, buffer[pos++] = 0x10; memcpy(buffer + pos, autn, 16); pos += 16; - buffer[pos++] = 0x00; } + buffer[pos++] = 0x00; + return pos; }