New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fatfs

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fatfs - npm Package Compare versions

Comparing version 0.10.3 to 0.10.4

24

dir.js

@@ -267,26 +267,22 @@ var S = require("./structs.js"),

if (1 || mainEntry.Name._lossy) { // HACK: always write long names until `._lossy` is more useful!
var workaroundTessel427 = ('\uFFFF'.length !== 1);
if (workaroundTessel427) throw Error("Your JS runtime does not have proper Unicode string support. (If Tessel, is your firmware up-to-date?)");
// name entries should be 0x0000-terminated and 0xFFFF-filled
var workaroundTessel427 = ('\uFFFF'.length !== 1);
var S_lde_f = S.longDirEntry.fields,
ENTRY_CHUNK_LEN = (S_lde_f.Name1.size + S_lde_f.Name2.size + S_lde_f.Name3.size)/2,
paddedName = (workaroundTessel427) ? require('struct-fu/8to16').fixString(name) : name,
partialLen = paddedName.length % ENTRY_CHUNK_LEN,
partialLen = name.length % ENTRY_CHUNK_LEN,
paddingNeeded = partialLen && (ENTRY_CHUNK_LEN - partialLen);
if (workaroundTessel427) {
if (paddingNeeded--) paddedName.push(0);
while (paddingNeeded-- > 0) paddedName.push(0xFFFF);
} else {
if (paddingNeeded--) paddedName += '\u0000';
while (paddingNeeded-- > 0) paddedName += '\uFFFF';
}
if (paddingNeeded--) name += '\u0000';
while (paddingNeeded-- > 0) name += '\uFFFF';
// now fill in as many entries as it takes
var off = 0,
ord = 1;
while (off < paddedName.length) entries.push({
while (off < name.length) entries.push({
Ord: ord++,
Name1: paddedName.slice(off, off+=S_lde_f.Name1.size/2),
Name1: name.slice(off, off+=S_lde_f.Name1.size/2),
Attr_raw: S.longDirFlag,
Chksum: null,
Name2: paddedName.slice(off, off+=S_lde_f.Name2.size/2),
Name3: paddedName.slice(off, off+=S_lde_f.Name3.size/2)
Name2: name.slice(off, off+=S_lde_f.Name2.size/2),
Name3: name.slice(off, off+=S_lde_f.Name3.size/2)
});

@@ -293,0 +289,0 @@ entries[entries.length - 1].Ord |= S.lastLongFlag;

{
"name": "fatfs",
"version": "0.10.3",
"version": "0.10.4",
"description": "fs implementation on top of raw FAT16/FAT32 block source",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc