+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
/* 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;
- }
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
}