diff options
| author | Simon Josefsson <simon@josefsson.org> | 2016-01-14 13:46:52 +0100 |
|---|---|---|
| committer | Simon Josefsson <simon@josefsson.org> | 2016-01-14 13:46:52 +0100 |
| commit | f20ce1128fb7f4d33297eee307dddaf0f92ac72d (patch) | |
| tree | f98f50c97e90f2be452f35d8432b59861d714a40 | |
| parent | 9a1a7e15d0706634971364493fbb06e77e74726c (diff) | |
| download | libidn-f20ce1128fb7f4d33297eee307dddaf0f92ac72d.tar.gz | |
Fix out-of-bounds stack read. Report and patch by Hanno Böck.
| -rw-r--r-- | lib/idna.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -212,6 +212,8 @@ step3: } if (i < 64) out[i] = '\0'; + else + return IDNA_INVALID_LENGTH; if (inasciirange) goto step8; } @@ -266,7 +268,7 @@ step3: step8: free (src); - if (strlen (out) < 1 || strlen (out) > 63) + if (strlen (out) < 1) return IDNA_INVALID_LENGTH; return IDNA_SUCCESS; |
