diff options
author | Timo Teräs <timo.teras@iki.fi> | 2014-08-01 08:54:39 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-08-01 08:57:30 +0300 |
commit | 82db5343f3ea625246e259780e0c85f074d0f058 (patch) | |
tree | 1f3129c8211b783a46c0cc75ee7b533d1ab76d3d /main/gdnsd/0003-fix-djbdns-text-parsing.patch | |
parent | d2ad90e966b5fff194a6ff207b5504e426515675 (diff) | |
download | aports-82db5343f3ea625246e259780e0c85f074d0f058.tar.bz2 aports-82db5343f3ea625246e259780e0c85f074d0f058.tar.xz |
main/gdnsd: fix bug parsing corrupted djbdns files
Fields are assigned to zero length read-only string literals if
they are not present in the zone data. Avoid writing to read-only
memory in those cases.
Diffstat (limited to 'main/gdnsd/0003-fix-djbdns-text-parsing.patch')
-rw-r--r-- | main/gdnsd/0003-fix-djbdns-text-parsing.patch | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/main/gdnsd/0003-fix-djbdns-text-parsing.patch b/main/gdnsd/0003-fix-djbdns-text-parsing.patch new file mode 100644 index 0000000000..bc0c4e29e0 --- /dev/null +++ b/main/gdnsd/0003-fix-djbdns-text-parsing.patch @@ -0,0 +1,13 @@ +diff -ru gdnsd-1.11.3.orig/gdnsd/zscan_djb.c gdnsd-1.11.3/gdnsd/zscan_djb.c +--- gdnsd-1.11.3.orig/gdnsd/zscan_djb.c 2014-08-01 08:22:55.000000000 -0300 ++++ gdnsd-1.11.3/gdnsd/zscan_djb.c 2014-08-01 08:49:37.338082860 -0300 +@@ -226,6 +226,9 @@ + unsigned int i; + unsigned int j; + ++ if (f->len < 2) ++ return; ++ + j = 0; + i = 0; + while (i < f->len) { |