projects
/
platform
/
upstream
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f902892
)
elf: Fix wrong fscanf usage on tst-pldd
author
Adhemerval Zanella
<adhemerval.zanella@linaro.org>
Fri, 25 Mar 2022 14:16:49 +0000
(11:16 -0300)
committer
Adhemerval Zanella
<adhemerval.zanella@linaro.org>
Thu, 31 Mar 2022 11:57:59 +0000
(08:57 -0300)
To take in consideration the extra '\0'.
Checked on x86_64-linux-gnu.
elf/tst-pldd.c
patch
|
blob
|
history
diff --git
a/elf/tst-pldd.c
b/elf/tst-pldd.c
index
f31f995
..
8916ce5
100644
(file)
--- a/
elf/tst-pldd.c
+++ b/
elf/tst-pldd.c
@@
-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);