[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: quik kernel size limit



On Thu, Oct 16, 2003 at 09:13:03PM +0200, Mich Lanners wrote:
> On  14 Oct, this message from Sven Luther echoed through cyberspace:
> >> Incidentaly, there's a bug in second/file.c, in load_file(), where a
> >> device path is predefined as '/dev/sdaX', 'X' being replaced later
> >> with partno+'0', thus limiting working partition numbers to 1-9, and
> >> overwriting the terminating \0 on larger partition numbers.
> > 
> > That would be good if it was fixed, or at least properly documented.
> 
> Since we're already at patching quik, how about this to remove that bug:
> 
> diff -uNr quik-2.0e-orig/second/file.c quik-2.0e/second/file.c
> --- quik-2.0e-orig/second/file.c        Sun Oct 12 13:46:52 2003
> +++ quik-2.0e/second/file.c     Thu Oct 16 21:08:01 2003
> @@ -389,13 +389,14 @@
>  {
>      ext2_ino_t inode;
>      int retval;
> -    char bogusdev[] = "/dev/sdaX";
> +    char bogusdev[11];
>  
>      if (device == 0)
>         device = bootdevice;
>      if (setdisk(device) < 0)
>         return 0;
> -    bogusdev[8] = partno + '0';
> +    partno &= 0xf;
> +    sprintf(bogusdev, "/dev/sda%d", partno);
>      filebuffer = buffer;
>      filelimit = limit;
>      decompress = dogunzip & 1;
> 
> Chris, since you're rebuilding quik :-), maybe you can give this a try
> as well?

I can; I need to hook up a SCSI disk to really test it? Does the root
partition/kernel have to be on the SCSI?

-- 
Debian GNU/Linux Operating System
  By the People, For the People
Chris Tillman (a people instance)
   toff one at cox dot net



Reply to: