Skip to content

JSON RPC responses are limited in size by size of pre-defined buffer #294

@oranjuice

Description

@oranjuice

The workflow of using fossa as a JSON RPC server as per the example requires the creation of a buffer for the response to be filled into:
https://github.com/cesanta/fossa/blob/master/examples/json_rpc_server/json_rpc_server.c#L36

The problem here is that the size of a response can be really huge or really small depending on the method called or even the parameters passed to the same method. Pro-actively allocating a large buffer can be a needless waste of memory whereas allocating a small buffer can lead to buffer overflows.

Is there a way around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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