[binutils-gdb] ld-plugin/pr24406-1.c: Correct buffer size to read

H.J.Lu hjl@sourceware.org
Mon Sep 23 15:52:00 GMT 2019


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4a41f3face78a551ea5c85db24125989754f2ee8

commit 4a41f3face78a551ea5c85db24125989754f2ee8
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Sep 23 08:51:36 2019 -0700

    ld-plugin/pr24406-1.c: Correct buffer size to read
    
    	* testsuite/ld-plugin/pr24406-1.c (main): Correct buffer size
    	to read.

Diff:
---
 ld/ChangeLog                       | 5 +++++
 ld/testsuite/ld-plugin/pr24406-1.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index fe27434..0e550d2 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* testsuite/ld-plugin/pr24406-1.c (main): Correct buffer size
+	to read.
+
 2019-09-23  Alan Modra  <amodra@gmail.com>
 
 	* deffilep.y: Include bfdlink.h.
diff --git a/ld/testsuite/ld-plugin/pr24406-1.c b/ld/testsuite/ld-plugin/pr24406-1.c
index 43995bd..fc706d3 100644
--- a/ld/testsuite/ld-plugin/pr24406-1.c
+++ b/ld/testsuite/ld-plugin/pr24406-1.c
@@ -12,6 +12,6 @@ __wrap_read (int fd, void *buffer, size_t count)
 int
 main ()
 {
-  int i = read (1, "abc", 5);
+  int i = read (1, "abc", 4);
   return i == 0;
 }



More information about the Binutils-cvs mailing list