opkg: Fix handling of sha256sums for conffiles
authorJohn Crispin <john@openwrt.org>
Fri, 4 Mar 2016 08:33:41 +0000 (08:33 +0000)
committerJohn Crispin <john@openwrt.org>
Fri, 4 Mar 2016 08:33:41 +0000 (08:33 +0000)
MD5s are shorter than SHA256, so reading buffer has to be bigger to read the
whole hash.

Signed-off-by: Michal Hrusecky <michal.hrusecky@nic.cz>
SVN-Revision: 48917

package/system/opkg/Makefile
package/system/opkg/patches/230-drop_md5_support.patch

index c09d1683fefb5e0cbc37cd89ba8ec599ebda11dc..d8cce2a8f2916143610aca2196bb9c96a38e61b9 100644 (file)
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/feeds.mk
 PKG_NAME:=opkg
 PKG_REV:=9c97d5ecd795709c8584e972bfdf3aee3a5b846d
 PKG_VERSION:=$(PKG_REV)
-PKG_RELEASE:=11
+PKG_RELEASE:=12
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=$(PKG_REV)
index 3b281040b03094ce6fae1af6c80f08cb2b023d97..57546bedf199c642370823cc3c741e30b839a661 100644 (file)
  
  # check for openssl
  AC_ARG_ENABLE(openssl,
+--- a/libopkg/pkg_parse.c
++++ b/libopkg/pkg_parse.c
+@@ -49,9 +49,9 @@ parse_status(pkg_t *pkg, const char *sst
+ static void
+ parse_conffiles(pkg_t *pkg, const char *cstr)
+ {
+-      char file_name[1024], md5sum[35];
++      char file_name[1024], md5sum[85];
+-      if (sscanf(cstr, "%1023s %34s", file_name, md5sum) != 2) {
++      if (sscanf(cstr, "%1023s %84s", file_name, md5sum) != 2) {
+               opkg_msg(ERROR, "Failed to parse Conffiles line for %s\n",
+                               pkg->name);
+               return;