26 Oct, 2011

1 commit


19 Oct, 2011

1 commit

  • readlink() never zero terminates the provided buffer.
    Therefore we already do

    buffer[count] = 0;

    This leads to an off-by-one buffer corruption as readlink()
    might return the full size of the buffer.

    The common technique is to reduce the buffer size by one.
    Another fix would be to check

    if (count < 0 || count == sizeof(buffer))
    fatal();

    Reducing the buffer size by one is easier IMHO.

    Signed-off-by: Thomas Jarosch
    Acked-by: David Rientjes
    Acked-by: Christoph Lameter
    Signed-off-by: Pekka Enberg

    Thomas Jarosch
     

20 Aug, 2011

1 commit


02 Jul, 2011

1 commit


06 Nov, 2010

1 commit