Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeError: Attempt to access memory outside buffer bounds #490

Open
CyanChanges opened this issue Dec 10, 2024 · 0 comments
Open

RangeError: Attempt to access memory outside buffer bounds #490

CyanChanges opened this issue Dec 10, 2024 · 0 comments

Comments

@CyanChanges
Copy link

CyanChanges commented Dec 10, 2024

Defintions here: https://github.com/CyanChanges/pastebin_but_github/blob/163d015645f6ef71a2ebd43abd18d91e2d6e9663/avsc_1.ts

trying to serialize with toBuffer()

ObjectSchema.toBuffer({
      "downloads": {
        "lastMonth": 124
      },
      "dependents": 0,
      "category": "other",
      "createdAt": "2022-03-16T09:45:31.652Z",
      "updatedAt": "2022-05-07T11:11:38.682Z",
      "updated": "2022-05-07T11:11:38.682Z",
      "verified": false,
      "insecure": false,
      "portable": false,
      "package": {
        "name": "koishi-plugin-chinfo",
        "keywords": [
          "chatbot",
          "koishi",
          "plugin",
          "Koishi.js"
        ],
        "version": "1.0.0",
        "description": "Show infos of a channel",
        "publisher": {
          "name": "constasj",
          "email": "[email protected]"
        },
        "maintainers": [
          {
            "name": "constasj",
            "email": "[email protected]"
          }
        ],
        "license": "MIT",
        "date": "2022-03-16T09:45:31.807Z",
        "links": {
          "npm": "https://www.npmjs.com/koishi-plugin-chinfo"
        },
        "contributors": []
      },
      "flags": {
        "insecure": 0
      },
      "manifest": {
        "public": [],
        "service": {
          "required": [],
          "optional": [],
          "implements": []
        },
        "locales": [],
        "description": "Show infos of a channel"
      },
      "publishSize": 1064
})

that throws following error:

Uncaught RangeError: Attempt to access memory outside buffer bounds
    at boundsError (ext:deno_node/internal/buffer.mjs:2383:11)
    at readUInt24LE (ext:deno_node/internal/buffer.mjs:1872:5)
    at Uint8Array.readUIntLE (ext:deno_node/internal/buffer.mjs:1016:12)
    at Tap.packLongBytes (file:///home/cyan/.cache/deno/npm/registry.npmjs.org/avsc/5.7.7/lib/utils.js:892:9)
    at AbstractLongType._write (file:///home/cyan/.cache/deno/npm/registry.npmjs.org/avsc/5.7.7/lib/types.js:2754:9)
    at UnwrappedUnionType._write (file:///home/cyan/.cache/deno/npm/registry.npmjs.org/avsc/5.7.7/lib/types.js:1329:23)
    at RecordType.writeObject [as _write] (eval at RecordType._createWriter (file:///home/cyan/.cache/deno/npm/registry.npmjs.org/avsc/5.7.7/lib/types.js:2343:10), <anonymous>:8:6)
    at RecordType.Type.toBuffer (file:///home/cyan/.cache/deno/npm/registry.npmjs.org/avsc/5.7.7/lib/types.js:658:8)
    at <anonymous>:1:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant