From 3b689b97bdf13354ab88583507e100d183d3fddf Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 4 Aug 2009 04:31:08 +0000 Subject: [PATCH] * fhandler.h (pdrive_buf): Defensively allocate one extra byte. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/fhandler.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7948357ca..977cf609b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2009-08-04 Christopher Faylor + + * fhandler.h (pdrive_buf): Defensively allocate one extra byte. + 2009-08-04 Christopher Faylor * fhandler.h (fhandler_cygdrive:DRVSZ): New enum. diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 87ae390d7..f661fc01f 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -759,7 +759,7 @@ class fhandler_cygdrive: public fhandler_disk_file }; int ndrives; const char *pdrive; - char pdrive_buf[2 * 26 * DRVSZ]; + char pdrive_buf[1 + (2 * 26 * DRVSZ)]; void set_drives (); public: fhandler_cygdrive ();