Просмотр исходного кода

* Fixed DNS returning a blank reply for reverse lookups with missing records.

svn: 1955
Bryan Drewery 21 лет назад
Родитель
Сommit
be7e0abec5
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      doc/UPDATES
  2. 1 1
      src/adns.c

+ 1 - 0
doc/UPDATES

@@ -49,6 +49,7 @@ Lines prefixxed with '-' were disabled before release and are not finishsed, or
 * Fixed users showing up in .whom after doing .botcmd and relinking the bot which the cmd was ran on. (#9)
 * Default UID is now: -1 (Fixes running as root by accident. #12)
 * Added some error logging for failed bind() listen() and getsockname()
+* Fixed DNS returning a blank reply for reverse lookups with missing records.
 
 1.2.2
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.

+ 1 - 1
src/adns.c

@@ -879,7 +879,7 @@ static int parse_reply(char *response, size_t nbytes)
 		case DNS_PTR:
 			r = my_dn_expand((const unsigned char *) response, eop, ptr, result, sizeof(result));
 
-			if (r != -1)
+			if (r != -1 && result[0])
 				answer_add(&q->answer, result);
 			break;
 		default: