mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
prevent possible segfault std::string if value NULL
Origin commit data
------------------
Branch: ni/coolstream
Commit: 40fe7fae34
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -453,9 +453,14 @@ bool CTZChangeNotifier::changeNotify(const neutrino_locale_t, void * Data)
|
||||
xmlNodePtr search = xmlDocGetRootElement(parser)->xmlChildrenNode;
|
||||
while (search) {
|
||||
if (!strcmp(xmlGetName(search), "zone")) {
|
||||
name = xmlGetAttribute(search, "name");
|
||||
const char *nptr = xmlGetAttribute(search, "name");
|
||||
if(nptr)
|
||||
name = nptr;
|
||||
|
||||
if(g_settings.timezone == name) {
|
||||
zone = xmlGetAttribute(search, "zone");
|
||||
const char *zptr = xmlGetAttribute(search, "zone");
|
||||
if(zptr)
|
||||
zone = zptr;
|
||||
if (!access("/usr/share/zoneinfo/" + zone, R_OK))
|
||||
found = true;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user