rpms/ldns/EL-5 ldns-1.6.4-locfix.patch,NONE,1.1 ldns.spec,1.23,1.24
Paul Wouters
pwouters at fedoraproject.org
Thu Feb 11 15:44:05 UTC 2010
Author: pwouters
Update of /cvs/extras/rpms/ldns/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29569
Modified Files:
ldns.spec
Added Files:
ldns-1.6.4-locfix.patch
Log Message:
* Thu Feb 11 2010 Paul Wouters <paul at xelerance.com> - 1.6.4-3
- Applied fix svn 3186 for LOC record parsing
ldns-1.6.4-locfix.patch:
rr.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
--- NEW FILE ldns-1.6.4-locfix.patch ---
Index: rr.c
===================================================================
--- rr.c (revision 3185)
+++ rr.c (working copy)
@@ -120,7 +120,7 @@
const char *delimiters;
ssize_t c;
ldns_rdf *owner_dname;
- const char* endptr;
+ const char* endptr;
/* used for types with unknown number of rdatas */
bool done;
@@ -130,13 +130,8 @@
uint16_t r_cnt;
uint16_t r_min;
uint16_t r_max;
+ size_t pre_data_pos;
- uint16_t hex_data_size;
- char *hex_data_str;
- uint16_t cur_hex_data_size;
- uint8_t *hex_data;
- size_t hex_pos;
-
new = ldns_rr_new();
owner = LDNS_XMALLOC(char, LDNS_MAX_DOMAINLEN + 1);
@@ -399,6 +394,7 @@
ldns_buffer_skip(rd_buf, 1);
}
+ pre_data_pos = ldns_buffer_position(rd_buf);
if ((c = ldns_bget_token(rd_buf, rd, delimiters,
LDNS_MAX_RDFLEN)) != -1) {
/* hmmz, rfc3597 specifies that any type can be represented with
@@ -408,7 +404,17 @@
rd_strlen = strlen(rd);
/* unknown RR data */
- if (rd_strlen == 2 && strncmp(rd, "\\#", 2) == 0 && !quoted) {
+ printf("rd %d: %s\n", rd_strlen, rd);
+ if (strncmp(rd, "\\#", 2) == 0 && !quoted && (rd_strlen == 2 || rd[2]==' ')) {
+ uint16_t hex_data_size;
+ char *hex_data_str;
+ uint16_t cur_hex_data_size;
+
+ /* go back to before \# and skip it while setting delimiters better */
+ ldns_buffer_set_position(rd_buf, pre_data_pos);
+ delimiters = "\n\t ";
+ (void)ldns_bget_token(rd_buf, rd, delimiters, LDNS_MAX_RDFLEN);
+ /* read rdata octet length */
c = ldns_bget_token(rd_buf, rd, delimiters, LDNS_MAX_RDFLEN);
if (c == -1) {
/* something goes very wrong here */
@@ -437,10 +443,10 @@
/* correct the rdf type */
/* if *we* know the type, interpret it as wireformat */
if (desc) {
- hex_data = LDNS_XMALLOC(uint8_t, hex_data_size + 2);
+ size_t hex_pos = 0;
+ uint8_t *hex_data = LDNS_XMALLOC(uint8_t, hex_data_size + 2);
ldns_write_uint16(hex_data, hex_data_size);
ldns_hexstring_to_data(hex_data + 2, hex_data_str);
- hex_pos = 0;
(void) ldns_wire2rdf(new, hex_data,
hex_data_size+2, &hex_pos);
LDNS_FREE(hex_data);
Index: ldns.spec
===================================================================
RCS file: /cvs/extras/rpms/ldns/EL-5/ldns.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- ldns.spec 22 Jan 2010 17:52:35 -0000 1.23
+++ ldns.spec 11 Feb 2010 15:44:04 -0000 1.24
@@ -8,7 +8,7 @@
Summary: Lowlevel DNS(SEC) library with API
Name: ldns
Version: 1.6.4
-Release: 2%{?dist}
+Release: 3%{?dist}
License: BSD
Url: http://www.nlnetlabs.nl/%{name}/
Source: http://www.nlnetlabs.nl/downloads/%{name}-%{version}.tar.gz
@@ -18,6 +18,7 @@ BuildRequires: libtool, autoconf, automa
BuildRequires: perl, libpcap-devel, openssl-devel
Patch1: ldns-installfix-r3167.patch
Patch2: ldns-rpathfix.patch
+Patch3: ldns-1.6.4-locfix.patch
%if %{with_python}
BuildRequires: python-devel, swig
@@ -52,6 +53,7 @@ Python extensions for ldns
%setup -q
%patch1
%patch2
+%patch3
# To built svn snapshots
rm config.guess config.sub ltmain.sh
aclocal
@@ -129,6 +131,9 @@ rm -rf %{buildroot}
%postun -p /sbin/ldconfig
%changelog
+* Thu Feb 11 2010 Paul Wouters <paul at xelerance.com> - 1.6.4-3
+- Applied fix svn 3186 for LOC record parsing
+
* Fri Jan 22 2010 Paul Wouters <paul at xelerance.com> - 1.6.4-2
- libtool on EL-5 does not take --install as argument
More information about the scm-commits
mailing list