NetBSD-Bugs archive

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

Re: PR/52522 CVS commit: src/sbin/gpt



The following reply was made to PR kern/52522; it has been noted by GNATS.

From: Piotr Meyer <aniou%smutek.pl@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: jnemeth%NetBSD.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: PR/52522 CVS commit: src/sbin/gpt
Date: Wed, 6 Sep 2017 16:54:14 +0200

 On Tue, Sep 05, 2017 at 06:35:01PM +0000, Christos Zoulas wrote:
 >  
 >  Modified Files:
 >  	src/sbin/gpt: gpt.c
 >  
 >  Log Message:
 >  PR/52522: Piotr Meyer: Don't NUL terminate the gpt label name.
 >  XXX: pullup-8
 >  
 >  
 >  To generate a diff of this commit:
 >  cvs rdiff -u -r1.70 -r1.71 src/sbin/gpt/gpt.c
 
 I'm afraid that is too early to pullup - truncating long labels 
 by NUL is only small fraction of problem and without number of 
 other changes things are now worse: now, we are able to create 
 label with max-length (36 UTF-16 characters) but shorter labels,
 created by NetBSD are not valid - there is no "end mark" (NUL)
 (I assume that destination buffer isn't zeroed during allocation).
 
 In the same time userland and kernel parts that assume
 that string IS NUL-terminated are still here, for example in gpt:
 https://nxr.netbsd.org/xref/src/sbin/gpt/gpt.c?r=1.71#132
 (but there may be other places as well).
 
 -- 
 Piotr 'aniou' Meyer
 


Home | Main Index | Thread Index | Old Index