ppp: fix a buffer overrun in the ms chap code
[openwrt/svn-archive/archive.git] / package / network / services / ppp / patches / 520-ms_chap_buffer_overrun.patch
1 Index: ppp-2.4.6/pppd/chap_ms.c
2 ===================================================================
3 --- ppp-2.4.6.orig/pppd/chap_ms.c 2014-07-29 00:38:03.073968867 +0100
4 +++ ppp-2.4.6/pppd/chap_ms.c 2014-07-29 00:41:52.897964689 +0100
5 @@ -382,7 +382,7 @@
6 unsigned char *private)
7 {
8 const struct chapms2_response_cache_entry *cache_entry;
9 - unsigned char auth_response[MS_AUTH_RESPONSE_LENGTH];
10 + unsigned char auth_response[MS_AUTH_RESPONSE_LENGTH+1];
11
12 challenge++; /* skip length, should be 16 */
13 *response++ = MS_CHAP2_RESPONSE_LEN;