You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
freifunkist-firmware/package/system/opkg/patches/080-suppress-blank-package-...

17 lines
367 B

--- 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;
}
/*