1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
svn-openwrt-archive/package/system/opkg/patches/080-suppress-blank-package-fields.patch
Steven Barth cde419ebfc opkg: ignore empty fields in package lists
This is to work around issues with package list generators creating
empty fields in some environments.

Based on a patch by Paul Selkrik <pselkrik@isc.org>
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 38390
2013-10-14 08:09:58 +00:00

17 lines
367 B
Diff

--- a/libopkg/parse_util.c
+++ b/libopkg/parse_util.c
@@ -35,7 +35,12 @@ is_field(const char *type, const char *l
char *
parse_simple(const char *type, const char *line)
{
- return trim_xstrdup(line + strlen(type) + 1);
+ char *field = trim_xstrdup(line + strlen(type) + 1);
+ if (strlen(field) == 0) {
+ free(field);
+ return NULL;
+ }
+ return field;
}
/*