aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/opkg/patches/270-fix-use-after-free.patch
blob: 96e24b9456b7e8ccdda2703c7dcb5c2f9e6379be (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/libopkg/opkg_download.c
+++ b/libopkg/opkg_download.c
@@ -335,7 +335,7 @@ opkg_prepare_url_for_install(const char
      hash_insert_pkg(pkg, 1);
 
      if (namep) {
-	  *namep = pkg->name;
+	  *namep = xstrdup(pkg->name);
      }
      return 0;
 }