gdb/ChangeLog:
authorPaul Koning <paul_koning@dell.com>
Wed, 17 Oct 2018 23:26:55 +0000 (19:26 -0400)
committerPaul Koning <paul_koning@dell.com>
Wed, 17 Oct 2018 23:26:55 +0000 (19:26 -0400)
        * charset.c (convert_between_encodings): Fix unsigned overflow.

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

gdb/ChangeLog
gdb/charset.c

index 36a4eeb9718de1d47031721774f99107ef6d12aa..81ac022499fd8e3ca7f66246fd95cb22fa9d8ef6 100644 (file)
@@ -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
index 8bb2b4d669f85ccf628885743b7f66a586cc91f3..64757ab279675afb3c821f11e7a5a94d0cb6771a 100644 (file)
@@ -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)
        {