diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2002-09-22 22:15:42 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2002-09-22 22:15:42 +0000 |
commit | 54ca6ff94a75ae09aad7d8a47cd6b55562f6cfe7 (patch) | |
tree | 8ae61d77f1b2a81c7f7f4ec311aa4649550b2d1b | |
parent | 845a86af9ca538b8b5a6566afdc8709c6ff0486b (diff) | |
download | fetchmail-54ca6ff94a75ae09aad7d8a47cd6b55562f6cfe7.tar.gz fetchmail-54ca6ff94a75ae09aad7d8a47cd6b55562f6cfe7.tar.bz2 fetchmail-54ca6ff94a75ae09aad7d8a47cd6b55562f6cfe7.zip |
Bounds-checking fix to prevent remote exploit.
svn path=/trunk/; revision=3729
-rw-r--r-- | mxget.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -68,6 +68,8 @@ struct mxentry *getmxrecords(const char *name) n = res_search(name, C_IN,T_MX, (unsigned char *)&answer, sizeof(answer)); if (n == -1) return((struct mxentry *)NULL); + if (n > sizeof(answer)) + n = sizeof(answer); hp = (HEADER *)&answer; cp = answer + HFIXEDSZ; |