(menu_hash) Prevent dereferences when settings is NULL
This commit is contained in:
parent
75b9a1312d
commit
69c82da160
|
@ -42,6 +42,7 @@ int menu_hash_get_help_de(uint32_t hash, char *s, size_t len)
|
||||||
switch (hash)
|
switch (hash)
|
||||||
{
|
{
|
||||||
case MENU_LABEL_INPUT_DRIVER:
|
case MENU_LABEL_INPUT_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
@ -147,6 +148,7 @@ int menu_hash_get_help_de(uint32_t hash, char *s, size_t len)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MENU_LABEL_VIDEO_DRIVER:
|
case MENU_LABEL_VIDEO_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
@ -224,6 +226,7 @@ int menu_hash_get_help_de(uint32_t hash, char *s, size_t len)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
|
|
@ -126,6 +126,7 @@ int menu_hash_get_help_es(uint32_t hash, char *s, size_t len)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MENU_LABEL_INPUT_DRIVER:
|
case MENU_LABEL_INPUT_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
@ -239,6 +240,7 @@ int menu_hash_get_help_es(uint32_t hash, char *s, size_t len)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MENU_LABEL_VIDEO_DRIVER:
|
case MENU_LABEL_VIDEO_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
@ -323,6 +325,7 @@ int menu_hash_get_help_es(uint32_t hash, char *s, size_t len)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
|
|
@ -120,6 +120,7 @@ int menu_hash_get_help_it(uint32_t hash, char *s, size_t len)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MENU_LABEL_INPUT_DRIVER:
|
case MENU_LABEL_INPUT_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
@ -212,6 +213,7 @@ int menu_hash_get_help_it(uint32_t hash, char *s, size_t len)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MENU_LABEL_VIDEO_DRIVER:
|
case MENU_LABEL_VIDEO_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
@ -290,6 +292,7 @@ int menu_hash_get_help_it(uint32_t hash, char *s, size_t len)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
|
|
@ -43,6 +43,7 @@ int menu_hash_get_help_pt(uint32_t hash, char *s, size_t len)
|
||||||
switch (hash)
|
switch (hash)
|
||||||
{
|
{
|
||||||
case MENU_LABEL_INPUT_DRIVER:
|
case MENU_LABEL_INPUT_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
@ -136,6 +137,7 @@ int menu_hash_get_help_pt(uint32_t hash, char *s, size_t len)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MENU_LABEL_VIDEO_DRIVER:
|
case MENU_LABEL_VIDEO_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
@ -214,6 +216,7 @@ int menu_hash_get_help_pt(uint32_t hash, char *s, size_t len)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
|
|
@ -111,6 +111,7 @@ int menu_hash_get_help_us(uint32_t hash, char *s, size_t len)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MENU_LABEL_INPUT_DRIVER:
|
case MENU_LABEL_INPUT_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
@ -203,6 +204,7 @@ int menu_hash_get_help_us(uint32_t hash, char *s, size_t len)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MENU_LABEL_VIDEO_DRIVER:
|
case MENU_LABEL_VIDEO_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
@ -281,6 +283,7 @@ int menu_hash_get_help_us(uint32_t hash, char *s, size_t len)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
||||||
|
if (settings)
|
||||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||||
|
|
||||||
switch (driver_hash)
|
switch (driver_hash)
|
||||||
|
|
Loading…
Reference in New Issue