~ubuntu-branches/ubuntu/trusty/maradns/trusty-proposed

« back to all changes in this revision

Viewing changes to update/2.0.03/maradns-2.0.02-debian_bug_607739_fix.patch

  • Committer: Package Import Robot
  • Author(s): Dariusz Dwornikowski
  • Date: 2014-02-16 19:36:04 UTC
  • mfrom: (1.2.11) (21.1.11 experimental)
  • Revision ID: package-import@ubuntu.com-20140216193604-xtmcopn9pilzszae
Tags: 2.0.09-1
* New maintainer (Closes: #739084)
* New upstream release to unstable
* Several security bugs (Closes: #739755)
   - security bugfix for CVE-2011-5055, CVE-2011-5056, CVE-2012-0024,
   CVE-2012-1570
   - security bugfix agains blind spoofing attack (no CVE number)
   - security bugfix for packet of death attack (no CVE number)
* Bump standards to 3.9.5
* Updated d/postinst to no longer modify conffiles (Closes: #710903)
* Init script fixed (Closes: #709826)
* --reinstall no longer kills the process (Closes: #701657)
* Updated old d/changelog entries, added information when the CVEs were
  fixed: 2.0.06-1, 2.0.04-1, 1.4.11-1, 1.2.12.06-1, 1.2.12.05-1, 1.0.28-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- maradns-2.0.02/server/MaraBigHash.c 2011-02-05 19:21:39.000000000 -0700
 
2
+++ maradns-2.0.03/server/MaraBigHash.c 2011-02-18 15:15:04.000000000 -0700
 
3
@@ -992,12 +992,33 @@
 
4
 */
 
5
 
 
6
 int warn_ddip(js_string *query) {
 
7
-    if(log_level == 0)
 
8
+    int a = 0, l = 0;
 
9
+    if(log_level == 0 || query == 0 || query->string == 0)
 
10
         return JS_SUCCESS;
 
11
     /* "Dotted decimal IP for NS, CNAME, or MX does not work with some DNS servers" */
 
12
     printf("%s%s",L_DDIP_WARN,L_F);
 
13
-    return JS_SUCCESS;
 
14
+    printf("Hostname of record with problem: ");
 
15
+    for(a = 0 ; a < query->unit_count ; a++) {
 
16
+       l = *(query->string + a);
 
17
+        if(l < 1 || l > 64) {
 
18
+           printf("\n");
 
19
+           return JS_SUCCESS;
 
20
+       }
 
21
+       for(;l>0;l--) {
 
22
+            char c;
 
23
+           a++;
 
24
+            c = *(query->string + a);
 
25
+            if(c>' ' && c < '~') {
 
26
+                printf("%c",c);
 
27
+            } else {
 
28
+                printf("~");
 
29
+           }
 
30
+        } 
 
31
+        printf(".");
 
32
     }
 
33
+    printf("\n");
 
34
+    return JS_SUCCESS;
 
35
+}   
 
36
 
 
37
 /* Synthesize a DDIP record, just in case a MX, NS, or CNAME points to a
 
38
    dotted-decimal IP