systemd/0001-Don-t-snprintf-a-potentially-NULL-pointer.patch

26 lines
895 B
Diff
Raw Normal View History

From 5effdfa831d75306fc0ff9b47d39997e4ae87f16 Mon Sep 17 00:00:00 2001
From: Michael Meeks <michael.meeks@collabora.com>
Date: Tue, 11 Feb 2014 14:42:26 +0000
Subject: [PATCH] Don't snprintf a potentially NULL pointer.
---
src/shared/log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/log.c b/src/shared/log.c
index 2a075ff..d6b138f 100644
--- a/src/shared/log.c
+++ b/src/shared/log.c
@@ -479,7 +479,7 @@ static int log_do_header(char *header, size_t size,
func ? "CODE_FUNCTION=" : "",
func ? LINE_MAX : 0, func,
func ? "\n" : "",
- object ? object_name : "",
+ object_name ? object_name : "",
object ? LINE_MAX : 0, object, /* %.0s means no output */
object ? "\n" : "",
program_invocation_short_name);
--
1.8.4.5