chiark / gitweb /
Update copyright dates everywhere
[adns.git] / src / transmit.c
index 33c33297c8b248329f212a91ce987be7d84f79dd..1674dbc67fb6702c7adc525c7664a63dc1377a2d 100644 (file)
@@ -5,7 +5,7 @@
  */
 /*
  *  This file is part of adns, which is
- *    Copyright (C) 1997-2000,2003,2006,2014-2016  Ian Jackson
+ *    Copyright (C) 1997-2000,2003,2006,2014-2016,2020  Ian Jackson
  *    Copyright (C) 2014  Mark Wooding
  *    Copyright (C) 1999-2000,2003,2006  Tony Finch
  *    Copyright (C) 1991 Massachusetts Institute of Technology
@@ -87,6 +87,7 @@ static adns_status qdparselabel(adns_state ads,
   while (p!=pe && (c= *p++)!='.') {
     if (c=='\\') {
       if (!(flags & adns_qf_quoteok_query)) return adns_s_querydomaininvalid;
+      if (p==pe) return adns_s_querydomaininvalid;
       if (ctype_digit(p[0])) {
        if (p+1==pe || p+2==pe) return adns_s_querydomaininvalid;
        if (ctype_digit(p[1]) && ctype_digit(p[2])) {