Assume a similar problem exists with this fdopen as fixed with r333.
[oweals/opkg-lede.git] / libopkg / pkg.c
index f73cf5c8a9ba9f286fbdf74acf8aa2381cd43a21..741f9418b2d880163115321c6bff705be2539796 100644 (file)
@@ -1031,7 +1031,7 @@ str_list_t *pkg_get_installed_files(opkg_conf_t *conf, pkg_t *pkg)
               free(list_file_name);
               return pkg->installed_files;
          }
-         list_file = fdopen(fd, "rw");
+         list_file = fdopen(fd, "rw+");
          if (list_file == NULL) {
               opkg_message(conf, OPKG_ERROR, "%s: fdopen: %s",
                               __FUNCTION__, strerror(errno));