NetBSD-Bugs archive

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

re: toolchain/54703: GCC 8 breaks i386 floppy install



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

From: matthew green <mrg%eterna.com.au@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: toolchain-manager%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
    netbsd-bugs%netbsd.org@localhost
Subject: re: toolchain/54703: GCC 8 breaks i386 floppy install
Date: Wed, 20 Nov 2019 18:56:37 +1100

 i have tracked this down to a bad strncmp() in ustarfs.c:
 
 ---
       /* if volume metadata is found, use it */
       if(strncmp(ustf->uas_active.ust_name, metaname,
           strlen(metaname)) == 0) {
               ustarfs_sscanf(ustf->uas_active.ust_name
                       + strlen(metaname), "%99o", &newvolblocks);
               ustf->uas_volsize = newvolblocks * 512
                                 - lda2pda(0);
 ---
 
 this strncmp() gets 'ust_name' of 'boot', and 'metaname'
 is the static string "USTAR.volsize.", yet this block is
 executed, and the sscanf() writes 0 to newvolblocks, and
 then uas_volsize becomes -8K (from lda2pda(0).)
 


Home | Main Index | Thread Index | Old Index