summaryrefslogtreecommitdiff
path: root/lib/rpmps.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rpmps.c')
-rw-r--r--lib/rpmps.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rpmps.c b/lib/rpmps.c
index c72ea0941..51a84dd17 100644
--- a/lib/rpmps.c
+++ b/lib/rpmps.c
@@ -13,7 +13,6 @@
/*@access fnpyKey @*/
/*@access rpmProblem @*/
-/*@access rpmps @*/
/*@unchecked@*/
static int _ps_debug = 0;
@@ -100,7 +99,9 @@ void rpmpsAppend(rpmps ps, rpmProblemType type,
p = ps->probs + ps->numProblems;
ps->numProblems++;
+/*@-boundswrite@*/
memset(p, 0, sizeof(*p));
+/*@=boundswrite@*/
p->type = type;
p->key = key;
@@ -112,11 +113,13 @@ void rpmpsAppend(rpmps ps, rpmProblemType type,
p->str1 = NULL;
if (dn != NULL || bn != NULL) {
+/*@-boundswrite@*/
t = xcalloc(1, (dn != NULL ? strlen(dn) : 0) +
(bn != NULL ? strlen(bn) : 0) + 1);
p->str1 = t;
if (dn != NULL) t = stpcpy(t, dn);
if (bn != NULL) t = stpcpy(t, bn);
+/*@=boundswrite@*/
}
}