On Mon, Jan 8, 2018 at 1:18 PM, Mason <slash.tmp@xxxxxxx> wrote: > (Could you CC me on your reply? I'm not subscribed to the ML.) > I'm normally using Gmane :-) But I can do email. OK. The proper (obvious?) fix appears to bail from read_kickstart() > if we were not able to actually read the kickstart file. > > Can you try the following patch, and run the program using valgrind? > > diff --git a/src/memory.cpp b/src/memory.cpp > index b91d6f224f2e..ec2990c31ba4 100644 > --- a/src/memory.cpp > +++ b/src/memory.cpp > @@ -578,6 +578,8 @@ static int read_kickstart (struct zfile *f, uae_u8 > *mem, int size, int dochecksu > } > oldpos = zfile_ftell (f); > i = zfile_fread (buffer, 1, 11, f); > + if (i < 11) /* Unable to read kickstart file */ > + return 0; > if (!memcmp(buffer, "KICK", 4)) { > zfile_fseek (f, 512, SEEK_SET); > kickdisk = 1; > > > Seems to work just fine. No output from valgrind that concerns amiberry.