From a00c7b1c4b76f09ebdc3e91bd0828c18a75829a8 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 21 Dec 2015 16:51:24 +0100 Subject: [PATCH] xbps-checkvers: add some assertions. --- bin/xbps-checkvers/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/xbps-checkvers/main.c b/bin/xbps-checkvers/main.c index 713e4b06..1e32870a 100644 --- a/bin/xbps-checkvers/main.c +++ b/bin/xbps-checkvers/main.c @@ -587,6 +587,10 @@ rcv_check_version(rcv_t *rcv) revision = map_find(rcv->env, "revision"); reverts = map_find(rcv->env, "reverts"); + assert(pkgname.v.s); + assert(version.v.s); + assert(revision.v.s); + srcver = strncpy(srcver, pkgname.v.s, pkgname.v.len); if (rcv->installed) rcv->pkgd = xbps_pkgdb_get_pkg(&rcv->xhp, srcver);