Minor bug in IS? - Minix

This is a discussion on Minor bug in IS? - Minix ; I think i found a minor bug in the IS server. It can be found in servers/is/dmp_pm.c on line 23-36: static char str[10]; ... str[10] = (flags & DONT_SWAP) ? 'D' : '-'; str[11] = (flags & PRIV_PROC) ? 'P' ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Minor bug in IS?

  1. Minor bug in IS?

    I think i found a minor bug in the IS server.

    It can be found in servers/is/dmp_pm.c on line 23-36:

    static char str[10];
    ...
    str[10] = (flags & DONT_SWAP) ? 'D' : '-';
    str[11] = (flags & PRIV_PROC) ? 'P' : '-';
    str[12] = '\0';

    I would suggest changing line 23 to the following to fit the entire
    string:

    static char str[13];

    The buffer overflow doesn't seem to give any problems, probably because
    of padding inserted by the compiler, but it might be nicer to fix it,
    especially with portability in mind.

    The file in the 3.1.3 release can be found here in the SVN repository:
    https://gforge.cs.vu.nl/plugins/scms...s/r3.1.3/serve
    rs/is/dmp_pm.c?rev=2859&root=minix&view=markup



  2. Re: Minor bug in IS?

    All,

    On 2007-04-20, Erik van der Kouwe wrote:
    > I think i found a minor bug in the IS server.


    Well spotted, fixed.

    =Ben



+ Reply to Thread