diff options
author | Werner Koch <wk@gnupg.org> | 2009-02-16 21:05:37 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2009-02-16 21:05:37 +0000 |
commit | 9ecd705ab395d6fa9c192471fe81dc160dfeafac (patch) | |
tree | 0ea203f7807d5671d8da3b3c699c1054f844ddb8 /mpi/mpicoder.c | |
parent | ba1c1d7456745adbd3b6b94bc935cacc914126eb (diff) | |
download | libgcrypt-9ecd705ab395d6fa9c192471fe81dc160dfeafac.tar.gz |
Portability fixes.
Diffstat (limited to 'mpi/mpicoder.c')
-rw-r--r-- | mpi/mpicoder.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |