NetBSD-Bugs archive

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

Re: kern/48852 CD9660 RockRidge: device files not properly handled



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

From: "Thomas Schmitt" <scdbackup%gmx.net@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/48852 CD9660 RockRidge: device files not properly handled
Date: Fri, 30 May 2014 13:46:49 +0200

 Further examinations:
 
 A hex editor shows that the PN entry in test.iso indeed bears 0,0
 as high and low number. ("high" and "low" is not "major", "minor",
 but just high 32 bits and low 32 bits of dev_t.)
 
 The "sizeof() > 32" in makefs/cd9660/iso9660_rrip.c is surely wrong.
 It should be 4.
 
 But the macros "major", "minor", "makedev" in <sys/types.h> show
 that major,minor numbers 0,12 should be encoded as high=0,low=12:
 
   #define makedev(x,y)    ((dev_t)((((x) <<  8) & 0x000fff00) | \
                                    (((y) << 12) & 0xfff00000) | \
                                    (((y) <<  0) & 0x000000ff)))
 
 I.e. the wrong condition would cause damage with devices which
 have high minor numbers. But not to the major number and not to
 minor numbers below 256.
 
 But i do see damage with 0,12.
 


Home | Main Index | Thread Index | Old Index