diff options
author | Guillem Jover <guillem@debian.org> | 2015-09-06 21:25:00 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2015-09-14 05:44:09 +0200 |
commit | e65aa3db04eb908c9507d5d356a95cedb890814d (patch) | |
tree | e5be4b4e921a4744d9d68f602c9cc0fd59008f58 /dpkg-deb/extract.c | |
parent | 64acb4e4b98d7abe7436d83f0d64f0a3238fe5f3 (diff) | |
download | dpkg-e65aa3db04eb908c9507d5d356a95cedb890814d.tar.gz |
dpkg-deb: Fix off-by-one write access on versionbuf variable
Closes: #798324
Warned-by: afl
Reported-by: Jacek Wielemborek <d33tah@gmail.com>
Stable-Candidate: 1.16.x 1.17.x
Diffstat (limited to 'dpkg-deb/extract.c')
-rw-r--r-- | dpkg-deb/extract.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c index d5ac05cc2..1d2a76acd 100644 --- a/dpkg-deb/extract.c +++ b/dpkg-deb/extract.c @@ -131,7 +131,7 @@ extracthalf(const char *debar, const char *dir, if (fstat(arfd, &stab)) ohshite(_("failed to fstat archive")); - r = read_line(arfd, versionbuf, strlen(DPKG_AR_MAGIC), sizeof(versionbuf)); + r = read_line(arfd, versionbuf, strlen(DPKG_AR_MAGIC), sizeof(versionbuf) - 1); if (r < 0) read_fail(r, debar, _("archive magic version number")); |