[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NULL check missing in lib/idna.c

From: Sarat Chandra Addepalli
Subject: NULL check missing in lib/idna.c
Date: Mon, 09 Jul 2012 10:13:43 +0000 (GMT)



In the function idna_to_ascii_4i() in lib/idna.c, at the end of step 2, the call src = "" -1, NULL) may result in a NULL return. This needs to be checked, and if that's the case, p needs to be freed and the function should return with an #Idna_rc error code. IMHO, NULL return occurs only in the case of a malloc fail (due to g_malloc() in the function g_utf8_to_ucs4_fast), so the error code should be IDNA_MALLOC_ERROR.


Please check the attached patch file.


Yours sincerely,

Sarat Addepalli.


Attachment: idna.patch
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]