aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2004-11-18 12:06:51 +0000
committerColin Percival <cperciva@FreeBSD.org>2004-11-18 12:06:51 +0000
commitd8ba0a6a45a03b01c485b3aa834a3ef883613b2e (patch)
tree8416fec65a8a90c1b6526e85a5cdbcff2ce44a55
parent73dc22f45454c7a981354aad6be7edd524eea2cc (diff)
downloadsrc-d8ba0a6a45a03b01c485b3aa834a3ef883613b2e.tar.gz
src-d8ba0a6a45a03b01c485b3aa834a3ef883613b2e.zip
FreeBSD-SA-04:16.fetch:releng/4.7
MFC revision 1.75 of src/usr.bin/fetch/fetch.c Bump newvers.sh and document in UPDATING. Approved by: so
Notes
Notes: svn path=/releng/4.7/; revision=137856
-rw-r--r--UPDATING4
-rw-r--r--sys/conf/newvers.sh2
-rw-r--r--usr.bin/fetch/fetch.c3
3 files changed, 7 insertions, 2 deletions
diff --git a/UPDATING b/UPDATING
index 920af00dc0bc..6096c8fc2a60 100644
--- a/UPDATING
+++ b/UPDATING
@@ -17,6 +17,10 @@ minimal number of processes, if possible, for that patch. For those
updates that don't have an advisory, or to be safe, you can do a full
build and install as described in the COMMON ITEMS section.
+20041118: p28 FreeBSD-SA-04:16.fetch
+ Correct a buffer overflow in fetch(1) which could allow a
+ mallicious server to execute arbitrary code on the client.
+
20040519: p27 FreeBSD-SA-04:10.cvs
Correct a heap overflow in cvs's pserver protocol parser.
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index fb715e4cda66..1ffe15f528d2 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -36,7 +36,7 @@
TYPE="FreeBSD"
REVISION="4.7"
-BRANCH="RELEASE-p27"
+BRANCH="RELEASE-p28"
RELEASE="${REVISION}-${BRANCH}"
VERSION="${TYPE} ${RELEASE}"
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
index 34ee02e68f3a..7dfdbaf26e8c 100644
--- a/usr.bin/fetch/fetch.c
+++ b/usr.bin/fetch/fetch.c
@@ -503,7 +503,8 @@ fetch(char *URL, const char *path)
/* suck in the data */
signal(SIGINFO, sig_handler);
while (!sigint && !sigalrm) {
- if (us.size != -1 && us.size - count < B_size)
+ if (us.size != -1 && us.size - count < B_size &&
+ us.size - count >= 0)
size = us.size - count;
else
size = B_size;