anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone
4bff0a
From 5d6a8b1b9728cfa54c89441a089ffbb156b59648 Mon Sep 17 00:00:00 2001
4bff0a
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
4bff0a
Date: Tue, 24 Jul 2018 21:24:53 +0200
4bff0a
Subject: [PATCH] bus-message: use define
4bff0a
4bff0a
(cherry picked from commit f22c308aff556bf5c6599ffcb61e637e366ab232)
4bff0a
4bff0a
Resolves: #1696224
4bff0a
---
4bff0a
 src/libsystemd/sd-bus/bus-message.c | 2 +-
4bff0a
 1 file changed, 1 insertion(+), 1 deletion(-)
4bff0a
4bff0a
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
4bff0a
index 7392a43a19..81aaa7f59f 100644
4bff0a
--- a/src/libsystemd/sd-bus/bus-message.c
4bff0a
+++ b/src/libsystemd/sd-bus/bus-message.c
4bff0a
@@ -227,7 +227,7 @@ static int message_append_field_string(
4bff0a
         /* dbus1 doesn't allow strings over 32bit, let's enforce this
4bff0a
          * globally, to not risk convertability */
4bff0a
         l = strlen(s);
4bff0a
-        if (l > (size_t) (uint32_t) -1)
4bff0a
+        if (l > UINT32_MAX)
4bff0a
                 return -EINVAL;
4bff0a
 
4bff0a
         /* Signature "(yv)" where the variant contains "s" */