Avoid possible buffer overflow

This commit is contained in:
Dave Davenport 2017-04-10 17:30:11 +02:00
parent 4156d142fe
commit 27339bf9bf
1 changed files with 1 additions and 1 deletions

View File

@ -616,7 +616,7 @@ void rofi_theme_convert_old ( void )
"* { bordercolor: %s; }",
"* { separatorcolor: %s; }"
};
for ( int i = 0; retv && retv[i]; i++ ) {
for ( int i = 0; retv && retv[i] && i < 3; i++ ) {
char *str = g_strdup_printf ( conf[i], retv[i] );
rofi_theme_parse_string ( str );
g_free ( str );