--- WWW/Library/Implementation/HTParse.c.orig 2010-08-05 19:47:30.000000000 -0400 +++ WWW/Library/Implementation/HTParse.c 2010-08-05 19:48:41.000000000 -0400 @@ -268,6 +268,11 @@ static void convert_to_idna(char *host) int ch = *src++; if (ch == HEX_ESCAPE) { + + /* Prevent an overflow */ + if (!*(src+1) || !*(src+2)) + break; + int hi = hex_decode(*src++); int lo = hex_decode(*src++);