From 9ecd705ab395d6fa9c192471fe81dc160dfeafac Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 16 Feb 2009 21:05:37 +0000 Subject: Portability fixes. --- mpi/mpicoder.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mpi/mpicoder.c') diff --git a/mpi/mpicoder.c b/mpi/mpicoder.c index 8f0c76f1..4c76189e 100644 --- a/mpi/mpicoder.c +++ b/mpi/mpicoder.c @@ -456,6 +456,10 @@ gcry_mpi_scan (struct gcry_mpi **ret_mpi, enum gcry_mpi_format format, const unsigned char *s = buffer; size_t n; + /* This test is not strictly necessary and an assert (!len) + would be sufficient. We keep this test in case we later + allow the BUFLEN argument to act as a sanitiy check. Same + below. */ if (len && len < 4) return gcry_error (GPG_ERR_TOO_SHORT); -- cgit v1.2.1