From: ticktock35 Date: Mon, 15 Dec 2008 05:15:12 +0000 (+0000) Subject: opkg: protect against NULL src X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=15893c2a54d2101b02533113c7b137170bea5810;p=oweals%2Fopkg-lede.git opkg: protect against NULL src git-svn-id: http://opkg.googlecode.com/svn/trunk@100 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- diff --git a/libopkg/opkg.c b/libopkg/opkg.c index 9f63812..4320ab9 100644 --- a/libopkg/opkg.c +++ b/libopkg/opkg.c @@ -61,7 +61,8 @@ old_pkg_to_new (pkg_t *old) new->name = sstrdup (old->name); new->version = pkg_version_str_alloc (old); new->architecture = sstrdup (old->architecture); - new->repository = sstrdup (old->src->name); + if (old->src) + new->repository = sstrdup (old->src->name); new->description = sstrdup (old->description); new->tags = sstrdup (old->tags); new->url = sstrdup (old->url);