From 3490f4e26068a755123680eb7a3b22abf3052f00 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Dec 15 2020 17:54:59 +0000 Subject: bus-message: use define (cherry picked from commit f22c308aff556bf5c6599ffcb61e637e366ab232) Resolves: #1696224 patch_name: 0165-bus-message-use-define.patch present_in_specfile: true location_in_specfile: 165 squash_commits: true --- diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index 7392a43..81aaa7f 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -227,7 +227,7 @@ static int message_append_field_string( /* dbus1 doesn't allow strings over 32bit, let's enforce this * globally, to not risk convertability */ l = strlen(s); - if (l > (size_t) (uint32_t) -1) + if (l > UINT32_MAX) return -EINVAL; /* Signature "(yv)" where the variant contains "s" */