[beast: 3/9] SFI: bcore.cc: fix missing NULL check
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 3/9] SFI: bcore.cc: fix missing NULL check
- Date: Thu, 8 Jun 2017 20:22:56 +0000 (UTC)
commit 005da0880e60f5d6ed2279c93faa14028cadb686
Author: Tim Janik <timj gnu org>
Date: Fri May 26 00:08:24 2017 +0200
SFI: bcore.cc: fix missing NULL check
Signed-off-by: Tim Janik <timj gnu org>
sfi/bcore.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/sfi/bcore.cc b/sfi/bcore.cc
index 031921b..d47e365 100644
--- a/sfi/bcore.cc
+++ b/sfi/bcore.cc
@@ -18,7 +18,8 @@ debug_key_enabled (const char *conditional)
const char *f = getenv ("BSE_DEBUG");
std::string flags = !f ? "" : ":" + std::string (f) + ":";
char *result = new char [flags.size() + 1];
- strcpy (result, flags.data());
+ if (result)
+ strcpy (result, flags.data());
debug_any_enabled = result && result[0];
return result;
} ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]