projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7705737
)
Dumb thinko in header data allocation
author
Panu Matilainen
<pmatilai@redhat.com>
Thu, 12 Jun 2008 08:04:33 +0000
(11:04 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Thu, 12 Jun 2008 08:05:47 +0000
(11:05 +0300)
lib/header.c
patch
|
blob
|
history
diff --git
a/lib/header.c
b/lib/header.c
index
d7e8f74
..
c73e25a
100644
(file)
--- a/
lib/header.c
+++ b/
lib/header.c
@@
-1235,9
+1235,8
@@
static int copyTdEntry(const indexEntry entry, rpmtd td, headerGetFlags flags)
case RPM_INT32_TYPE:
case RPM_INT64_TYPE:
if (allocMem) {
- size_t dlen = entry->length * typeSizes[entry->info.type];
- td->data = xmalloc(dlen);
- memcpy(td->data, entry->data, dlen);
+ td->data = xmalloc(entry->length);
+ memcpy(td->data, entry->data, entry->length);
} else {
td->data = entry->data;
}