1
0
Fork 0
mirror of git://git.psyced.org/git/psyclpc synced 2024-08-15 03:20:16 +00:00

applied patch from zesstra which fixed ldmud bug #498

This commit is contained in:
Philipp Hancke 2009-03-12 06:38:07 +01:00
parent 2ede0de60e
commit 1d490d6a92

View file

@ -137,6 +137,7 @@ f_idna_stringprep (svalue_t *sp)
/* Get and check the flags. */
{
p_uint argflags = (p_uint)sp->u.number;
sp--;
if (argflags > (STRINGPREP_FLAG_MAX << 1)-1
|| argflags & (STRINGPREP_NO_NFKC_FLAG | STRINGPREP_NO_BIDI_FLAG)
@ -151,12 +152,11 @@ f_idna_stringprep (svalue_t *sp)
if (argflags & STRINGPREP_NO_NFKC_FLAG) flags |= STRINGPREP_NO_NFKC;
if (argflags & STRINGPREP_NO_BIDI_FLAG) flags |= STRINGPREP_NO_BIDI;
if (argflags & STRINGPREP_NO_UNASSIGNED_FLAG) flags |= STRINGPREP_NO_UNASSIGNED;
free_svalue(sp--);
}
/* Get and check the profile */
prof = (int)sp->u.number;
free_svalue(sp--);
sp--;
/* select the profile */
switch(prof)
@ -214,12 +214,13 @@ f_idna_stringprep (svalue_t *sp)
if (ret != STRINGPREP_OK)
{
put_number(sp, -ret);
errorf("stringprep(): Error %s", stringprep_strerror(ret));
/* NOTREACHED */
}
else
{
// free the string argument
free_svalue(sp);
put_c_string(sp, buf);
}