(message-citation-line-format)
[gnus] / lisp / dns.el
index fdb4ca4..05b2f73 100644 (file)
@@ -1,6 +1,6 @@
 ;;; dns.el --- Domain Name Service lookups
 
-;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: network
@@ -404,10 +404,11 @@ If REVERSEP, look up an IP address."
            (decf times step))
          (ignore-errors
            (delete-process process))
-         (when tcp-p
+         (when (and tcp-p
+                    (>= (buffer-size) 2))
            (goto-char (point-min))
            (delete-region (point) (+ (point) 2)))
-         (unless (zerop (buffer-size))
+         (when (>= (buffer-size) 2)
            (let ((result (dns-read (buffer-string))))
              (if fullp
                  result