This is the mail archive of the gdb-patches@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]

[PATCH] Prevent overflow in rl_set_screen_size


Hi,

I was running GDB under the undefined behavior sanitizer and I found a signed integer overflow in set_screen_size. I’ve attached a (IMO slightly clumsy, but I couldn’t think of a nicer way to solve this) patch that solves this issue. I couldn’t figure out how to formally test this code, but I can compile and run this on my computer running macOS Mojave 10.14.1. Would someone mind taking a look at this? This is my first set of contributions to GDB, so if there’s anything wrong (or you have general feedback) I’d love to hear about it!

Regards,
Saagar Jha

Attachment: Prevent-overflow-in-rl_set_screen_size.patch
Description: Binary data






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