1
0

080-suppress-blank-package-fields.patch 367 B

12345678910111213141516
  1. --- a/libopkg/parse_util.c
  2. +++ b/libopkg/parse_util.c
  3. @@ -35,7 +35,12 @@ is_field(const char *type, const char *l
  4. char *
  5. parse_simple(const char *type, const char *line)
  6. {
  7. - return trim_xstrdup(line + strlen(type) + 1);
  8. + char *field = trim_xstrdup(line + strlen(type) + 1);
  9. + if (strlen(field) == 0) {
  10. + free(field);
  11. + return NULL;
  12. + }
  13. + return field;
  14. }
  15. /*