]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
gssd: NULL-terminate buffer after read in read_service_info (try #2)
authorJeff Layton <jlayton@redhat.com>
Mon, 23 Mar 2009 12:12:14 +0000 (08:12 -0400)
committerSteve Dickson <steved@redhat.com>
Mon, 23 Mar 2009 12:12:14 +0000 (08:12 -0400)
Valgrind complains that we're passing an unintialized buffer to sscanf
here. The main problem seems to be that we're not ensuring that the
buffer is NULL terminated before we pass it off.

This is the second version of this patch, the first one did not increase
the buffer allocation by 1 which could have led to clobbering the next
byte on the stack if nbytes == INFOBUFLEN.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>

No differences found