Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix pkg create when reading legacy message.
Vsevolod Stakhov committed 10 years ago
commit dec57bcf5c71cfa3a63d55b5fbeb1870a6d02059
parent 56f6e3e
2 files changed +3 -2
modified libpkg/pkg.c
@@ -1829,7 +1829,7 @@ pkg_message_to_ucl(struct pkg *pkg)
	obj = ucl_object_typed_new (UCL_OBJECT);

	ucl_object_insert_key(obj,
-
			ucl_object_fromstring_common (pkg->message->str, 0,
+
			ucl_object_fromstring_common(pkg->message->str, 0,
					UCL_STRING_RAW|UCL_STRING_TRIM),
			"message", 0, false);

modified libpkg/pkg_create.c
@@ -308,7 +308,8 @@ pkg_load_message_from_file(int fd, struct pkg *pkg, const char *path, bool is_uc
			return (ret);
		}
		else {
-
			obj = ucl_object_fromlstring(buf, size);
+
			obj = ucl_object_fromstring_common(buf, size,
+
					UCL_STRING_RAW|UCL_STRING_TRIM);
			ret = pkg_message_from_ucl(pkg, obj);
			ucl_object_unref(obj);
			free(buf);