Andreas Schwab
44414488d6
- Import patches from 2.23 branch OBS-URL: https://build.opensuse.org/request/show/394998 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=436
20 lines
602 B
Diff
20 lines
602 B
Diff
2016-05-02 Florian Weimer <fweimer@redhat.com>
|
|
|
|
[BZ #20031]
|
|
* hesiod/hesiod.c (get_txt_records): Return error if TXT record is
|
|
completely empty.
|
|
|
|
Index: glibc-2.23/hesiod/hesiod.c
|
|
===================================================================
|
|
--- glibc-2.23.orig/hesiod/hesiod.c
|
|
+++ glibc-2.23/hesiod/hesiod.c
|
|
@@ -411,7 +411,7 @@ get_txt_records(struct hesiod_p *ctx, in
|
|
cp += INT16SZ + INT32SZ; /* skip the ttl, too */
|
|
rr.dlen = ns_get16(cp);
|
|
cp += INT16SZ;
|
|
- if (cp + rr.dlen > eom) {
|
|
+ if (rr.dlen == 0 || cp + rr.dlen > eom) {
|
|
__set_errno(EMSGSIZE);
|
|
goto cleanup;
|
|
}
|