GNOME Bugzilla – Bug 336941
DNS lookup of text information is truncated
Last modified: 2006-04-04 13:40:29 UTC
Please describe the problem: The result of performing a "Text Information" (TXT) DNS lookup is truncated. Steps to reproduce: Do a TXT lookup for the domain "blueyonder.co.uk" Actual results: The result shows up as: "v=spf1 Expected results: The actual result is: "v=spf1 a:mailq1.blueyonder.co.uk ip4:195.188.0.0/16 ip4:213.48.0.0/16 ip4:80.192.0.0/14 ip4:82.32.0.0/12 ip4:62.30.0.0/15 ?all" Does this happen every time? Yes Other information:
Certainly it is a bug in src/lookup.c (strip_line) which read only the first string and forget the rest of the line. I have added the keyword gnome-love.
Solved by modifying LOOKUP_FORMAT and LOOKUP_FORMAT_MX in lookup.h. You were rigth, the problem was in sscanf :) --- lookup.h.old 2006-04-03 22:38:11.000000000 +0200 +++ lookup.h 2006-04-03 22:37:32.000000000 +0200 @@ -26,6 +26,6 @@ #define LOOKUP_OPTIONS "+nocomments +search +nocmd +nostats +noadditional" -#define LOOKUP_FORMAT "%s %d %s %s %s" -#define LOOKUP_FORMAT_MX "%s %d %s MX %s %s]" +#define LOOKUP_FORMAT "%s %d %s %s %[^\n]" +#define LOOKUP_FORMAT_MX "%s %d %s MX %s %[^\n]" #define LOOKUP_NUM_ARGS 5
Excelent Alejandro. It is only missing a ChangeLog entry. May you add a ChangeLog entry and upload the new patch? For more information take a look at http://live.gnome.org/GnomeLove/SubmittingPatches
Created attachment 62713 [details] [review] Fix bogus defines Ok, thanks for the help, this was my first "hack" :p -- ChangeLog 2006-4-4 Alejandro Andrés <fuzzy.alej@gmail.com> * src/lookup.h Fixed bogus LOOKUP_FORMAT and LOOKUP_FORMAT_MX defines.
Created attachment 62724 [details] [review] Fix bad formed defines Finally I get to know how to make patches :p Thanks for the help
Created attachment 62725 [details] [review] Fixes bad format defines The hell with the patches! No more submitting, I swear :/
Much better, but the format of the date is YYYY-MM-DD, so, it should be 2006-04-04 instead of 2006-4-4. On the other hand, it is useful (not always, but almost everytime) cooking patches using the CVS version (for the stable and/or development branch); because some patches could be applied before than yours. Think about it next time :-) Your first patch has been submitted in CVS stable and CVS HEAD. Thanks you.