From 34e0a97caf7a24bdb2b986e9d48548ca4644fff8 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 21 Mar 2022 11:50:26 +0000 Subject: [PATCH] auc: only add filesystem type if it is known Prevent NULL-pointer on older versions of OpenWrt. Signed-off-by: Daniel Golle (cherry picked from commit f1969ab5849095dbfe85f34e9415988357ed53bf) Signed-off-by: Daniel Golle --- utils/auc/src/auc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/auc/src/auc.c b/utils/auc/src/auc.c index 4d4b6917d3..f3468a5a8d 100644 --- a/utils/auc/src/auc.c +++ b/utils/auc/src/auc.c @@ -1647,7 +1647,9 @@ int main(int args, char *argv[]) { blobmsg_add_string(&reqbuf, "version", branch->version); blobmsg_add_string(&reqbuf, "version_code", branch->version_code); blobmsg_add_string(&reqbuf, "target", target); - blobmsg_add_string(&reqbuf, "filesystem", target_fstype?target_fstype:rootfs_type); + + if (target_fstype || rootfs_type) + blobmsg_add_string(&reqbuf, "filesystem", target_fstype?target_fstype:rootfs_type); sanetized_board_name = strdup(board_name); tmp = sanetized_board_name; -- 2.30.2