1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

prevent memory fault from card name if file name is given

This commit is contained in:
none 2020-09-17 09:55:48 +02:00 committed by rjkm
parent 8e39e291a0
commit 072689735c

View File

@ -34,9 +34,9 @@ static int yesno()
static int update_flash(struct ddflash *ddf)
{
char *fname;
char *fname, *default_fname;
int res, stat = 0;
char *name;
char *name = 0, *dname;
switch (ddf->id.device) {
case 0x300:
@ -111,8 +111,9 @@ static int update_flash(struct ddflash *ddf)
break;
default:
fname = ddf->fname;
default_fname = devid2fname(ddf->id.device, &name);
if (!fname)
fname = devid2fname(ddf->id.device, &name);
fname = default_fname;
if (name)
printf("Card: %s\n", name);
if (ddf->flash_name)