summaryrefslogtreecommitdiff
path: root/src/string/strstr.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2014-06-05 22:32:42 +0200
committerRich Felker <dalias@aerifal.cx>2014-06-06 17:57:37 -0400
commit309cfa4f2c3a5596a024d0bff7bba326382884b4 (patch)
tree63ea5fc0cb154de336417ba76cd3e7a9c4f85c47 /src/string/strstr.c
parent8daa49cdfd5c74fb8edf931394be11c62b915e52 (diff)
downloadmusl-309cfa4f2c3a5596a024d0bff7bba326382884b4.tar.gz
fix multiple validation issues in dns response label parsing
Due to an error introduced in commit fcc522c92335783293ac19df318415cd97fbf66b, checking of the remaining output buffer space was not performed correctly, allowing malformed input to write past the end of the buffer. In addition, the loop detection logic failed to account for the possibility of infinite loops with no output, which would hang the function. The output size is now limited more strictly so only names with valid length are accepted. (cherry picked from commit b3d9e0b94ea73c68ef4169ec82c898ce59a4e30a)
Diffstat (limited to 'src/string/strstr.c')
0 files changed, 0 insertions, 0 deletions