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

Re: [Minios-devel] [UNIKRAFT PATCH] lib/ukdebug: Fix buffer overrun in debug print routine



Hi Florian,

Looks good, thanks.

-- Felipe

Reviewed-by: Felipe Huici <felipe.huici@xxxxxxxxx>

============================================================
Dr. Felipe Huici
Chief Researcher, Systems and Machine Learning Group
NEC Laboratories Europe GmbH
Kurfuerstenanlage 36, D-69115 Heidelberg
Tel.  +49
(0)6221 4342-241
Fax:  +49
(0)6221 4342-155
 
e-mail:
felipe.huici@xxxxxxxxx
============================================================
Registered at Amtsgericht Mannheim, Germany, HRB728558

On 07.05.19, 17:43, "Minios-devel on behalf of Florian Schmidt" 
<minios-devel-bounces@xxxxxxxxxxxxxxxxxxxx on behalf of 
florian.schmidt@xxxxxxxxx> wrote:

    The printing routine miscalculated the amount of characters to print if
    there were several newlines present in the buffer.
    
    Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
    ---
     lib/ukdebug/print.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/lib/ukdebug/print.c b/lib/ukdebug/print.c
    index 9c70a81f..f43ab86e 100644
    --- a/lib/ukdebug/print.c
    +++ b/lib/ukdebug/print.c
    @@ -179,7 +179,7 @@ static void _vprint(struct _vprint_console *cons,
     
                nlptr = memchr(lptr, '\n', len);
                if (nlptr) {
    -                   llen = (int)((uintptr_t)nlptr - (uintptr_t)lbuf) + 1;
    +                   llen = (int)((uintptr_t)nlptr - (uintptr_t)lptr) + 1;
                        cons->newline = 1;
                } else {
                        llen = len;
    -- 
    2.21.0
    
    
    _______________________________________________
    Minios-devel mailing list
    Minios-devel@xxxxxxxxxxxxxxxxxxxx
    https://lists.xenproject.org/mailman/listinfo/minios-devel

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.