Skip to content

Webshark crashes with big pcap files because of integer overflow #51

Description

@CodeCommandoPants

Trying to upload bigger pcap files in webshark like a 4.3GB pcap file makes the application crash because of 32bit integer overflow.

Steps to re-produce:

Webshark then crashes with this error:

webshark    | {"level":50,"time":1745413016639,"pid":34,"hostname":"6fc59162ab98","err":{"type":"RangeError","message":"The value of \"length\" is out of range. It must be >= 0 && <= 2147483647. Received 4263638204","stack":"RangeError [ERR_OUT_OF_RANGE]: The value of \"length\" is out of range. It must be >= 0 && <= 2147483647. Received 4263638204\n    at Object.write (node:fs:852:5)\n    at writeAll (node:fs:2241:6)\n    at node:fs:2331:7\n    at FSReqCallback.oncomplete (node:fs:188:23)","code":"ERR_OUT_OF_RANGE"},"msg":"The value of \"length\" is out of range. It must be >= 0 && <= 2147483647. Received 4263638204"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions