[git] GnuPG - branch, STABLE-BRANCH-1-4, updated. gnupg-1.4.20-4-ga38dffd
by Werner Koch
cvs at cvs.gnupg.org
Fri Jan 15 15:57:14 CET 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-1-4 has been updated
via a38dffde7b19bd4881afcd87c23aac2daa5bd52a (commit)
from e26706700f6f339891cce924e2a401dfbdba1a0e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a38dffde7b19bd4881afcd87c23aac2daa5bd52a
Author: Werner Koch <wk at gnupg.org>
Date: Fri Jan 15 15:51:37 2016 +0100
Fix possible AIX problem with sysconf in rndunix.
* cipher/rndunix.c [HAVE_STDINT_H]: Include stdint.h.
(start_gatherer): Detect misbehaving sysconf.
--
See
GnuPG-bug-id: 1778
for the reason of this patch. There is no concrete bug report but this
chnage should not harm.
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/cipher/rndunix.c b/cipher/rndunix.c
index 72905e6..5cf2b9e 100644
--- a/cipher/rndunix.c
+++ b/cipher/rndunix.c
@@ -50,6 +50,9 @@
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
#include <string.h>
#include <assert.h>
@@ -700,12 +703,18 @@ start_gatherer( int pipefd )
{ int nmax, n1, i;
#ifdef _SC_OPEN_MAX
if( (nmax=sysconf( _SC_OPEN_MAX )) < 0 ) {
-#ifdef _POSIX_OPEN_MAX
+# ifdef _POSIX_OPEN_MAX
nmax = _POSIX_OPEN_MAX;
-#else
+# else
nmax = 20; /* assume a reasonable value */
-#endif
+# endif
}
+ /* AIX returns INT32_MAX instead of a proper value. We assume that
+ * this is always an error and use a reasonable value. */
+# ifdef INT32_MAX
+ if (nmax == INT32_MAX)
+ nmax = 20;
+# endif
#else
nmax = 20; /* assume a reasonable value */
#endif
-----------------------------------------------------------------------
Summary of changes:
cipher/rndunix.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list