projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
60e35e3
)
silc_rng_exec_command() left zombie processes if command didn't generate any
author
cras
<cras>
Sat, 24 Aug 2002 12:15:25 +0000
(12:15 +0000)
committer
cras
<cras>
Sat, 24 Aug 2002 12:15:25 +0000
(12:15 +0000)
output.
CHANGES
patch
|
blob
|
history
lib/silccrypt/silcrng.c
patch
|
blob
|
history
diff --git
a/CHANGES
b/CHANGES
index b19e51dd260a21196c9120a517b64b43825264be..49296c2a916b40159caf9e929441e66c0f161d31 100644
(file)
--- a/
CHANGES
+++ b/
CHANGES
@@
-1,3
+1,8
@@
+Sat Aug 24 15:11:32 EEST 2002 Timo Sirainen <tss@iki.fi>
+
+ * silc_rng_exec_command() left zombie processes if command
+ didn't generate any output.
+
Fri Aug 23 22:05:44 CEST 2002 Lubomir Sedlacik <salo@silcnet.org>
* Rewrote iconv checking, introduce --with-iconv for systems
Fri Aug 23 22:05:44 CEST 2002 Lubomir Sedlacik <salo@silcnet.org>
* Rewrote iconv checking, introduce --with-iconv for systems
diff --git
a/lib/silccrypt/silcrng.c
b/lib/silccrypt/silcrng.c
index a97773d3554b59645742967e4ff90fce7a69fc56..f8274211d3d459a8eef022cd172e1d52fbc39754 100644
(file)
--- a/
lib/silccrypt/silcrng.c
+++ b/
lib/silccrypt/silcrng.c
@@
-351,19
+351,18
@@
static void silc_rng_exec_command(SilcRng rng, char *command)
/* Get data as much as we can get into the buffer */
for (i = 0; i < sizeof(buf); i++) {
c = fgetc(fd);
/* Get data as much as we can get into the buffer */
for (i = 0; i < sizeof(buf); i++) {
c = fgetc(fd);
- if (c == EOF) {
- if (!i)
- return;
+ if (c == EOF)
break;
break;
- }
buf[i] = c;
}
pclose(fd);
buf[i] = c;
}
pclose(fd);
- /* Add the buffer into random pool */
- silc_rng_add_noise(rng, buf, i);
- memset(buf, 0, sizeof(buf));
+ if (i != 0) {
+ /* Add the buffer into random pool */
+ silc_rng_add_noise(rng, buf, i);
+ memset(buf, 0, sizeof(buf));
+ }
#endif
}
#endif
}