L4Re/departure

Changeset

516:e0068e6a2231
2023-03-15 Paul Boddie raw files shortlog changelog graph Fixed memchr invocation when searching for the end of line.
test_files/programs/dstest_exec_payload.c (file)
     1.1 --- a/test_files/programs/dstest_exec_payload.c	Wed Mar 15 00:33:40 2023 +0100
     1.2 +++ b/test_files/programs/dstest_exec_payload.c	Wed Mar 15 15:20:18 2023 +0100
     1.3 @@ -74,7 +74,7 @@
     1.4  
     1.5      /* Find newline. */
     1.6  
     1.7 -    newline = (char *) memchr(buf + current, (int) '\n', limit);
     1.8 +    newline = (char *) memchr(buf + current, (int) '\n', limit - current);
     1.9  
    1.10      if (newline != NULL)
    1.11      {