forked from pool/systemd
23 lines
749 B
Diff
23 lines
749 B
Diff
|
From 348a25edbb87ee4e67aa79fcb97a2bc1b5c11c7b Mon Sep 17 00:00:00 2001
|
||
|
From: Lukas Nykryn <lnykryn@redhat.com>
|
||
|
Date: Wed, 19 Dec 2012 14:38:53 +0100
|
||
|
Subject: [PATCH] coredumpctl: check return of strndup
|
||
|
|
||
|
---
|
||
|
src/journal/coredumpctl.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
Index: systemd-195/src/journal/coredumpctl.c
|
||
|
===================================================================
|
||
|
--- systemd-195.orig/src/journal/coredumpctl.c
|
||
|
+++ systemd-195/src/journal/coredumpctl.c
|
||
|
@@ -222,7 +222,7 @@ static int retrieve(sd_journal *j, const
|
||
|
assert(len >= field);
|
||
|
|
||
|
*var = strndup((const char*)data + field, len - field);
|
||
|
- if (!var)
|
||
|
+ if (!*var)
|
||
|
return log_oom();
|
||
|
|
||
|
return 0;
|