[gtk] Fix buffer overflow in eclipse finder
parent
da7cd6fd60
commit
ba3138a098
|
@ -47,7 +47,7 @@ void dialogEclipseFinder(AppData* app)
|
|||
ed->eclipseList = NULL;
|
||||
ed->eclipseListStore = NULL;
|
||||
ed->bSolar = TRUE;
|
||||
sprintf(ed->body, "%s", eclipsePlanetTitles[0]);
|
||||
ed->body = eclipsePlanetTitles[0];
|
||||
ed->sel = NULL;
|
||||
|
||||
ed->window = GTK_DIALOG(gtk_dialog_new_with_buttons(_("Eclipse Finder"),
|
||||
|
@ -426,7 +426,7 @@ static void eclipseBodySelect(GtkMenuShell* menu, EclipseData* ed)
|
|||
int itemIndex = g_list_index(list, item);
|
||||
|
||||
/* Set string according to body array */
|
||||
sprintf(ed->body, "%s", eclipsePlanetTitles[itemIndex]);
|
||||
ed->body = eclipsePlanetTitles[itemIndex];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ struct _EclipseData {
|
|||
selDate* d2;
|
||||
|
||||
bool bSolar;
|
||||
char body[7];
|
||||
const char* body;
|
||||
GtkTreeSelection* sel;
|
||||
|
||||
GtkWidget *eclipseList;
|
||||
|
|
Loading…
Reference in New Issue