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

Fix issue #55 - plctest crashes with segmentation fault #56

Merged
merged 2 commits into from
Nov 9, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions mme/ARPCPrint.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,9 @@ void ARPCPrint (FILE * fp, void const * memory, size_t extent)
*argp = LE32TOH (*argp);
argp++;
}

#if defined (__UCLIBC__)

/*
* This is a simple fix to work around uclibc implementation issue with variable arugment lists; We are
* testing a better one but most PLC users will not have access to firmware that exercises this module;
*/

argp = (uint32_t *)(&data->LIST [LE16TOH (data->ARGOFFSET)]);
fprintf (fp, (char *)(&data->LIST [LE16TOH (data->STROFFSET)]), argp [0], argp [1], argp [2], argp [3], argp [4], argp [5], argp [6], argp [7], argp [8], argp [9], argp [10], argp [11], argp [12], argp [13], argp [14], argp [15], argp [16], argp [17], argp [18], argp [19], argp [20], argp [21], argp [22], argp [23], argp [24], argp [25], argp [26], argp [27], argp [28], argp [29], argp [30], argp [31], argp [32], argp [33], argp [34], argp [35], argp [36], argp [37], argp [38], argp [39]);

#else

vfprintf (fp, (char *)(&data->LIST [LE16TOH (data->STROFFSET)]), (void *)(&data->LIST [LE16TOH (data->ARGOFFSET)]));

#endif

fprintf (fp, "\n");
fflush (fp);
return;
Expand Down