MCPcopy Create free account
hub / github.com/boostorg/build / check_cmd_for_too_long_lines

Function check_cmd_for_too_long_lines

v2/engine/execcmd.c:76–93  ·  view source on GitHub ↗

Returns whether the given command string contains lines longer than the given * maximum. */

Source from the content-addressed store, hash-verified

74 * maximum.
75 */
76int check_cmd_for_too_long_lines( char const * command, int const max,
77 int * const error_length, int * const error_max_length )
78{
79 while ( *command )
80 {
81 size_t const l = strcspn( command, "\n" );
82 if ( l > max )
83 {
84 *error_length = l;
85 *error_max_length = max;
86 return EXEC_CHECK_LINE_TOO_LONG;
87 }
88 command += l;
89 if ( *command )
90 ++command;
91 }
92 return EXEC_CHECK_OK;
93}
94
95
96/* Checks whether the given shell list is actually a request to execute raw

Callers 2

exec_checkFunction · 0.85
exec_checkFunction · 0.85

Calls 1

strcspnFunction · 0.85

Tested by

no test coverage detected