1101. [bug] Array bounds read error in lwres_gai_strerror.
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -1,3 +1,5 @@
|
||||
1101. [bug] Array bounds read error in lwres_gai_strerror.
|
||||
|
||||
1100. [bug] libbind: DNSSEC key ids were computed incorrectly.
|
||||
|
||||
1099. [cleanup] libbind: defining REPORT_ERRORS in lib/bind/dst caused
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: gai_strerror.c,v 1.14 2001/05/29 22:40:10 bwelling Exp $ */
|
||||
/* $Id: gai_strerror.c,v 1.15 2001/11/02 00:48:06 marka Exp $ */
|
||||
|
||||
#include <lwres/netdb.h>
|
||||
|
||||
@@ -43,7 +43,8 @@ lwres_gai_strerror(int ecode) {
|
||||
char *deconst_ptr;
|
||||
} ptr;
|
||||
|
||||
if ((ecode < 0) || (ecode > EAI_MAX))
|
||||
if ((ecode < 0) ||
|
||||
(ecode >= (int)(sizeof(gai_messages)/sizeof(*gai_messages))))
|
||||
ptr.const_ptr = "invalid error code";
|
||||
else
|
||||
ptr.const_ptr = gai_messages[ecode];
|
||||
|
||||
Reference in New Issue
Block a user