summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2011-09-11 21:24:24 (EDT)
committer graham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2011-09-11 21:24:24 (EDT)
commit989997d1488ad22b1aabe0ae34324d56b4f72fc7 (patch)
tree606b72001a2007f70f6be1e4ba4b213f54227ad0
parent989e9d3972939e7b8a3b3720d0bcffb1f559b468 (diff)
Don't use conf->offline_root directly, it might be NULL.
This patch fixes a problem that arises when conf->offline_root is null. The resulting string was "(null)//etc/opkg/trusted.gpg" when it should have been "/etc/opkg/trusted.gpg". From Kyle Manna <kyle.manna@gmail.com>. git-svn-id: http://opkg.googlecode.com/svn/trunk@626 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
-rw-r--r--libopkg/opkg_download.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopkg/opkg_download.c b/libopkg/opkg_download.c
index 4a8b2a2..e53e64e 100644
--- a/libopkg/opkg_download.c
+++ b/libopkg/opkg_download.c
@@ -360,7 +360,7 @@ opkg_verify_file (char *text_file, char *sig_file)
if (err)
return -1;
- sprintf_alloc(&trusted_path, "%s/%s", conf->offline_root, "/etc/opkg/trusted.gpg");
+ trusted_path = root_filename_alloc("/etc/opkg/trusted.gpg");
err = gpgme_data_new_from_file (&key, trusted_path, 1);
free (trusted_path);
if (err)