Index: branches/ErmaC/Enoch/Chameleon.xcodeproj/project.pbxproj =================================================================== --- branches/ErmaC/Enoch/Chameleon.xcodeproj/project.pbxproj (revision 2503) +++ branches/ErmaC/Enoch/Chameleon.xcodeproj/project.pbxproj (revision 2504) @@ -285,6 +285,11 @@ 3696B2941A1D2EAB004272A6 /* text_scroll_prev.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = text_scroll_prev.png; sourceTree = ""; }; 3696B2951A1D2EAB004272A6 /* theme.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = theme.plist; sourceTree = ""; }; 3696B2961A1D2EAB004272A6 /* thumb.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = thumb.png; sourceTree = ""; }; + 36A9C0021A2A26DA00EEDDF1 /* boot1-install.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "boot1-install.c"; path = "boot1-install/boot1-install.c"; sourceTree = ""; }; + 36A9C0031A2A26DA00EEDDF1 /* Cconfig */ = {isa = PBXFileReference; lastKnownFileType = text; name = Cconfig; path = "boot1-install/Cconfig"; sourceTree = ""; }; + 36A9C0041A2A26DA00EEDDF1 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; name = Makefile; path = "boot1-install/Makefile"; sourceTree = ""; }; + 36A9C0051A2A26E900EEDDF1 /* boot1x.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = boot1x.s; sourceTree = ""; }; + 36A9C0061A2A26F300EEDDF1 /* boot0xg.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = boot0xg.s; sourceTree = ""; }; 36AB75E114BD091C005B8045 /* InstallLog.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = InstallLog.sh; sourceTree = ""; }; 36AB75E314BD0925005B8045 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = ""; }; 36AB75E414BD092D005B8045 /* preinstall */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = preinstall; sourceTree = ""; }; @@ -1584,6 +1589,16 @@ path = default; sourceTree = ""; }; + 36A9C0011A2A26C900EEDDF1 /* boot1-install */ = { + isa = PBXGroup; + children = ( + 36A9C0021A2A26DA00EEDDF1 /* boot1-install.c */, + 36A9C0031A2A26DA00EEDDF1 /* Cconfig */, + 36A9C0041A2A26DA00EEDDF1 /* Makefile */, + ); + name = "boot1-install"; + sourceTree = ""; + }; 36B43E8114BCE91300D29461 /* OptionalSettings */ = { isa = PBXGroup; children = ( @@ -3241,6 +3256,7 @@ B0056CE711F3868000754B65 /* boot0.s */, B41899FF14BFBE5D00ED5B0B /* boot0hfs.s */, B41899FE14BFBE5200ED5B0B /* boot0md.s */, + 36A9C0061A2A26F300EEDDF1 /* boot0xg.s */, B41899FD14BFBE4500ED5B0B /* Cconfig */, B0056CE811F3868000754B65 /* chain0.s */, B0056CE911F3868000754B65 /* Makefile */, @@ -3256,6 +3272,7 @@ B4189A0114BFBE8900ED5B0B /* boot1h.s */, B0056CEF11F3868000754B65 /* boot1he.s */, B0056CF011F3868000754B65 /* boot1hp.s */, + 36A9C0051A2A26E900EEDDF1 /* boot1x.s */, B4189A0014BFBE7D00ED5B0B /* Cconfig */, B0056CF111F3868000754B65 /* Makefile */, ); @@ -3461,6 +3478,7 @@ isa = PBXGroup; children = ( A3561C8B1413FD7800E9B51E /* bdmesg.c */, + 36A9C0011A2A26C900EEDDF1 /* boot1-install */, B4189A2414BFBFD100ED5B0B /* Cconfig */, A3561C8A1413FD7800E9B51E /* dyldsymboltool.c */, A3561C721413FD7800E9B51E /* fdisk */, Index: branches/ErmaC/Enoch/i386/libsaio/msdos.c =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/msdos.c (revision 2503) +++ branches/ErmaC/Enoch/i386/libsaio/msdos.c (revision 2504) @@ -683,6 +683,7 @@ { return -1; } + bzero(st,sizeof (struct msdosdirstate) ); if (dirPath[0]) { uint8_t *buf=malloc(msdosclustersize); @@ -691,6 +692,8 @@ free (st); return -1; } + bzero(buf,msdosclustersize ); + dirp = getdirpfrompath (ih, dirPath, buf); if (!dirp || !(dirp->deAttributes & ATTR_DIRECTORY)) { @@ -784,7 +787,7 @@ } // Calculate a fake timestamp using modification date and time values. - *time = ((dirp->deMDate & 0x7FFF) << 16) + dirp->deMTime; + *time = (dirp->deMDate & 0x7FFF) << (16 + dirp->deMTime); if (infoValid) { @@ -821,6 +824,7 @@ { return -1; } + bzero(buf,msdosclustersize); dirp = getdirpfrompath (ih, filePath, buf); if (!dirp || (dirp->deAttributes & ATTR_DIRECTORY)) @@ -889,6 +893,8 @@ { return -1; } + bzero(buf,msdosclustersize); + dirp = getdirpfrompath (ih, filePath, buf); if (!dirp || (dirp->deAttributes & ATTR_DIRECTORY)) { @@ -975,6 +981,9 @@ return; } + bzero(label,sizeof(label)); + bzero(vfatlabel,sizeof(vfatlabel)); + label[0] = '\0'; initRoot (&st); @@ -983,6 +992,8 @@ { return; } + bzero(st.buf,msdosclustersize); + while ((dirp = getnextdirent (ih, vfatlabel, &st))) if (dirp->deAttributes & ATTR_VOLUME) { strncpy((char *)label, (char *)dirp->deName, LABEL_LENGTH);