mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
elf: Fix wrong fscanf usage on tst-pldd
To take in consideration the extra '\0'. Checked on x86_64-linux-gnu.
This commit is contained in:
parent
f902892aaf
commit
b2cd93fce6
@ -113,7 +113,8 @@ do_test (void)
|
||||
TEST_VERIFY (out != NULL);
|
||||
|
||||
/* First line is in the form of <pid>: <full path of executable> */
|
||||
TEST_COMPARE (fscanf (out, "%u: " STRINPUT (512), &pid, buffer), 2);
|
||||
TEST_COMPARE (fscanf (out, "%u: " STRINPUT (sizeof (buffer) - 1), &pid,
|
||||
buffer), 2);
|
||||
|
||||
TEST_COMPARE (pid, *target_pid_ptr);
|
||||
TEST_COMPARE (strcmp (basename (buffer), "tst-pldd"), 0);
|
||||
|
Loading…
Reference in New Issue
Block a user