overflow.c 346 B

1234567891011121314151617
  1. #include <reproc/run.h>
  2. #include "assert.h"
  3. int main(void)
  4. {
  5. const char *argv[] = { RESOURCE_DIRECTORY "/overflow", NULL };
  6. char *output = NULL;
  7. reproc_sink sink = reproc_sink_string(&output);
  8. int r = -1;
  9. r = reproc_run_ex(argv, (reproc_options){ 0 }, sink, sink);
  10. ASSERT_OK(r);
  11. ASSERT(output != NULL);
  12. reproc_free(output);
  13. }