Skip to content

error: too few arguments to function 'json_objOpen' #8

Description

@smdjeff

prototype in json-maker.h is
char* json_objOpen( char* dest, char const* name, size_t* remLen );

but the sample code is...
dest = json_objOpen( dest, name );

also noticed the code looked suspiciously reactionary to buffer overflow at...

   char buff[512];
    int len = data_to_json( buff, &data );
    if( len >= sizeof buff ) {
        fprintf( stderr, "%s%d%s%d\n", "Error. Len: ", len, " Max: ", (int)sizeof buff - 1 );
        return EXIT_FAILURE;
    }

betting that issue was fixed, but the sample code wasn't updated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions