This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] gdb/ChangeLog:


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

commit 89eb3c547018af6a41ce9b3614cc2ab9a679168b
Author: Paul Koning <paul_koning@dell.com>
Date:   Wed Oct 17 19:26:55 2018 -0400

        gdb/ChangeLog:
    
            * charset.c (convert_between_encodings): Fix unsigned overflow.
    
        gdb/charset.c (convert_between_encodings): Fix unsigned overflow.

Diff:
---
 gdb/ChangeLog | 4 ++++
 gdb/charset.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 36a4eeb..81ac022 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2018-10-17  Paul Koning  <paul_koning@dell.com>
+
+	* charset.c (convert_between_encodings): Fix unsigned overflow.
+
 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
 
 	* fbsd-nat.c (fbsd_nat_target::info_proc) Use
diff --git a/gdb/charset.c b/gdb/charset.c
index 8bb2b4d..64757ab 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -548,7 +548,7 @@ convert_between_encodings (const char *from, const char *to,
 
       /* Now make sure that the object on the obstack only includes
 	 bytes we have converted.  */
-      obstack_blank_fast (output, -outleft);
+      obstack_blank_fast (output, -(ssize_t) outleft);
 
       if (r == (size_t) -1)
 	{


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]