From: Tim Kientzle Date: Mon, 27 Jul 2009 04:23:26 +0000 (-0400) Subject: Use fread() for reading from console; this needs to be carefully tested. X-Git-Tag: v2.8.0~488 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bea9cc7a83a970b6df450d88537625819bd9764b;p=thirdparty%2Flibarchive.git Use fread() for reading from console; this needs to be carefully tested. SVN-Revision: 1295 --- diff --git a/tar/util.c b/tar/util.c index 156afa927..8fba34b72 100644 --- a/tar/util.c +++ b/tar/util.c @@ -215,7 +215,7 @@ yes(const char *fmt, ...) fprintf(stderr, " (y/N)? "); fflush(stderr); - l = read(2, buff, sizeof(buff) - 1); + l = fread(buff, 1, sizeof(buff) - 1, stderr); if (l <= 0) return (0); buff[l] = 0;