Release ProzGUI 2.2.0

This commit is contained in:
Mario Fetka
2026-07-14 17:14:13 +02:00
parent 63711f178a
commit 305c6c4a54
9 changed files with 258 additions and 210 deletions
+2 -2
View File
@@ -380,7 +380,7 @@ void DL_Window::start_download()
/*Display resume status */
if (download->resume_support)
{
sprintf(buffer, _("RESUME supported"));
snprintf(buffer, sizeof(buffer), "%s", _("RESUME supported"));
resume_status_box->textcolor(FL_BLUE);
resume_status_box->value(buffer);
@@ -388,7 +388,7 @@ void DL_Window::start_download()
no_resume_later_button->show();
} else
{
sprintf(buffer, _("RESUME NOT supported"));
snprintf(buffer, sizeof(buffer), "%s", _("RESUME NOT supported"));
resume_status_box->textcolor(FL_RED);
resume_status_box->value(buffer);
resume_later_button->hide();
+8 -3
View File
@@ -58,7 +58,12 @@ void load_savefile(Fl_Browser *browser)
}
fscanf(fp, "%d\n", &num_dls);
if (fscanf(fp, "%d\n", &num_dls) != 1 || num_dls < 0 || num_dls > 100000)
{
fclose(fp);
proz_debug("Invalid URL list header");
return;
}
char *line=(char *)malloc (20000);
if(line==0)
@@ -72,14 +77,14 @@ if(line==0)
{
for(int i=0; i<num_dls;i++)
{
// fgets(line, sizeof(line) - 1, fp);
if(fscanf(fp,"%s\n", line)==EOF)
if(fgets(line, 20000, fp) == NULL)
{
fclose(fp);
free(line);
proz_debug("Could not read the list of URLS from file!!");
return;
}
line[strcspn(line, "\r\n")] = '\0';
browser->add(line);
}
}