mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
src/system/localize.cpp Undefined allocation of 0 bytes
This commit is contained in:
@@ -223,6 +223,7 @@ CLocaleManager::loadLocale_ret_t CLocaleManager::loadLocale(const char * const l
|
|||||||
fclose(fd);
|
fclose(fd);
|
||||||
if(buf)
|
if(buf)
|
||||||
free(buf);
|
free(buf);
|
||||||
|
if(memp - *mem > 0){
|
||||||
char *_mem = (char *) realloc(*mem, memp - *mem);
|
char *_mem = (char *) realloc(*mem, memp - *mem);
|
||||||
if (_mem) {
|
if (_mem) {
|
||||||
if (_mem != *mem) {
|
if (_mem != *mem) {
|
||||||
@@ -233,7 +234,7 @@ CLocaleManager::loadLocale_ret_t CLocaleManager::loadLocale(const char * const l
|
|||||||
*mem = _mem;
|
*mem = _mem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for (unsigned j = 1; j < (sizeof(locale_real_names)/sizeof(const char *)); j++)
|
for (unsigned j = 1; j < (sizeof(locale_real_names)/sizeof(const char *)); j++)
|
||||||
if (loadData[j] == locale_real_names[j])
|
if (loadData[j] == locale_real_names[j])
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user