Make this pass the test cases again.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22620 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -108,22 +108,20 @@ wind_punycode_label_toascii(const uint32_t *in, size_t in_len,
|
|||||||
out[o++] = in[i];
|
out[o++] = in[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (o == i) {
|
|
||||||
*out_len = o;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
b = h;
|
b = h;
|
||||||
if (b > 0) {
|
if (b > 0) {
|
||||||
if (o >= *out_len)
|
if (o >= *out_len)
|
||||||
return WIND_ERR_OVERRUN;
|
return WIND_ERR_OVERRUN;
|
||||||
out[o++] = 0x2D;
|
out[o++] = 0x2D;
|
||||||
}
|
}
|
||||||
|
/* is this string punycoded */
|
||||||
if (o + 4 >= *out_len)
|
if (h < in_len) {
|
||||||
return WIND_ERR_OVERRUN;
|
if (o + 4 >= *out_len)
|
||||||
memmove(out + 4, out, o);
|
return WIND_ERR_OVERRUN;
|
||||||
memcpy(out, "xn--", 4);
|
memmove(out + 4, out, o);
|
||||||
o += 4;
|
memcpy(out, "xn--", 4);
|
||||||
|
o += 4;
|
||||||
|
}
|
||||||
|
|
||||||
while (h < in_len) {
|
while (h < in_len) {
|
||||||
m = (unsigned)-1;
|
m = (unsigned)-1;
|
||||||
|
Reference in New Issue
Block a user