Le 14/02/2015 20:21, David Holland a écrit : > On Sat, Feb 14, 2015 at 08:07:39AM +0000, Maxime Villard wrote: > > Modified Files: > > src/sys/ufs/ffs: ffs_appleufs.c > > > > Log Message: > > ffs_appleufs_validate(): > > - remove superfluous printfs > > - ensure ul_namelen!=0, otherwise the kernel accesses ul_name[-1] and > > overwrites the previous field in the structure. > > Did you test this?
It is the only change I didn't test. This change was superficial anyway. Verily, I didn't understand what this function was supposed to do: it is never called with n!=NULL, and the misleading comment plus the negative index convinced me it was just dead. > It is almost certain that this bit: > > *n = *o; > - n->ul_checksum = 0; > n->ul_checksum = ffs_appleufs_cksum(n); > > breaks it. Yes, you are right. I thought it was another misleading instruction. > Also, I think you might want to keep the print when the > checksum is wrong. > If we keep this print, then we keep a lot of other prints. So we don't keep it. Thanks!