Messages in this thread | | | Date | Fri, 14 Oct 2011 12:53:30 -0700 (PDT) | From | David Rientjes <> | Subject | Re: [slabinfo PATCH] Fix off-by-one after readlink() call |
| |
On Fri, 14 Oct 2011, Thomas Jarosch wrote:
> The problem is the line after the readlink() call: > > buffer[count] = '\0'; > > 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. >
I think this should be used for changelog.
Acked-by: David Rientjes <rientjes@google.com>
| |