diff options
author | Jindrich Novy <jnovy@redhat.com> | 2008-04-20 12:17:37 +0200 |
---|---|---|
committer | Jindrich Novy <jnovy@redhat.com> | 2008-04-20 21:49:51 +0200 |
commit | 3dad7b6f0f463d23518f01543da9b958c6fc12f0 (patch) | |
tree | 834df40718d2b81d7b93a3354c10e17b3e55ad10 /lib/psm.c | |
parent | cee73cdc0b165a4044795accde68bf37a7684125 (diff) | |
download | rpm-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |