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

ton

Package Overview
Dependencies
Maintainers
3
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ton - npm Package Compare versions

Comparing version 12.3.1 to 12.3.2

dist/utils/strings.spec.d.ts

19

dist/utils/strings.js

@@ -5,3 +5,3 @@ "use strict";

const Builder_1 = require("../boc/Builder");
function readString(slice) {
function readBuffer(slice) {
// Check consistency

@@ -14,13 +14,16 @@ if (slice.remaining % 8 !== 0) {

}
if (slice.remainingRefs === 1 && slice.remaining > 7) {
throw new Error(`invalid string length: ${slice.remaining}`);
if (slice.remainingRefs === 1 && (1023 - slice.remaining) > 7) {
throw new Error(`invalid string length: ${slice.remaining / 8}`);
}
// Read string
let res = slice.readBuffer(slice.remaining / 8).toString();
let res = slice.readBuffer(slice.remaining / 8);
// Read tail
if (slice.remainingRefs === 1) {
res += readString(slice.readRef());
res = Buffer.concat([res, readBuffer(slice.readRef())]);
}
return res;
}
function readString(slice) {
return readBuffer(slice).toString();
}
exports.readString = readString;

@@ -33,7 +36,7 @@ function bufferToCell(src) {

let t = src.slice(127);
builder.storeBuffer(a);
builder.storeRef(bufferToCell(t));
builder = builder.storeBuffer(a);
builder = builder.storeRef(bufferToCell(t));
}
else {
builder.storeBuffer(src);
builder = builder.storeBuffer(src);
}

@@ -40,0 +43,0 @@ }

{
"name": "ton",
"version": "12.3.1",
"version": "12.3.2",
"repository": "https://github.com/tonwhales/ton.git",

@@ -5,0 +5,0 @@ "author": "Steve Korshakov <steve@korshakov.com>",

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