summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1998-10-27 19:54:08 +0000
committerjbj <devnull@localhost>1998-10-27 19:54:08 +0000
commit482a553ada47b679df075c1c05dcaad5e3d776e8 (patch)
tree8dc78779fdb8de3a6f02a9decbdf9355eb934c73 /lib
parent62efcbd3fc18b322d1cb236f0ea4cf7dc9099beb (diff)
downloadlibrpm-tizen-482a553ada47b679df075c1c05dcaad5e3d776e8.tar.gz
librpm-tizen-482a553ada47b679df075c1c05dcaad5e3d776e8.tar.bz2
librpm-tizen-482a553ada47b679df075c1c05dcaad5e3d776e8.zip
fix off-by-1 alloca that prevented relocating /.
CVS patchset: 2504 CVS date: 1998/10/27 19:54:08
Diffstat (limited to 'lib')
-rw-r--r--lib/install.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/install.c b/lib/install.c
index 2c138f1ac..df2b0a62c 100644
--- a/lib/install.c
+++ b/lib/install.c
@@ -270,7 +270,7 @@ static int assembleFileList(Header h, struct fileMemory * mem,
} while (rc > 0 && nextReloc);
if (!rc) {
- newName = alloca(newLen + strlen(mem->names[i]));
+ newName = alloca(newLen + strlen(mem->names[i]) + 1);
strcpy(newName, nextReloc->newPath);
strcat(newName, mem->names[i] + len);
rpmMessage(RPMMESS_DEBUG, _("relocating %s to %s\n"),