summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
authorJindrich Novy <jnovy@redhat.com>2008-04-20 12:17:37 +0200
committerJindrich Novy <jnovy@redhat.com>2008-04-20 21:49:51 +0200
commit3dad7b6f0f463d23518f01543da9b958c6fc12f0 (patch)
tree834df40718d2b81d7b93a3354c10e17b3e55ad10 /lib/psm.c
parentcee73cdc0b165a4044795accde68bf37a7684125 (diff)
downloadrpm-3dad7b6f0f463d23518f01543da9b958c6fc12f0.tar.gz
rpm-3dad7b6f0f463d23518f01543da9b958c6fc12f0.tar.bz2
rpm-3dad7b6f0f463d23518f01543da9b958c6fc12f0.zip
Don't use static buffers
Diffstat (limited to 'lib/psm.c')
-rw-r--r--lib/psm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/psm.c b/lib/psm.c
index 70f0c2a9e..8179b6432 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -125,7 +125,7 @@ const char ** argv;
const char * str;
int32_t * i32p;
} body;
- char numbuf[32];
+ char *numbuf = NULL;
rpmTagType type;
for (tagm = tagMacros; tagm->macroname != NULL; tagm++) {
@@ -133,8 +133,9 @@ const char ** argv;
continue;
switch (type) {
case RPM_INT32_TYPE:
- sprintf(numbuf, "%d", *body.i32p);
+ rasprintf(&numbuf, "%d", *body.i32p);
addMacro(NULL, tagm->macroname, NULL, numbuf, -1);
+ numbuf = _free(numbuf);
break;
case RPM_STRING_TYPE:
addMacro(NULL, tagm->macroname, NULL, body.str, -1);