On 05/18/2011 07:27 AM, Vratislav Podzimek wrote:
+ GByteArray *ssid_ba; + int ssid_len; + + ssid_len = strlen (ssid); + if (!ssid || !ssid_len || (ssid_len> 32)) + { + return(4); + } + ssid_len = strlen (ssid); + ssid_ba = g_byte_array_sized_new (ssid_len);
What on earth? Why are you taking strlen(ssid) twice? Why are you checking if it's NULL *after* calling strlen() on it? That's a segfault. Why isn't there an enum for these return codes? They should be symbolic. What happens if ssid_len is 31? No. -- Peter Computers don't make errors. What they do, they do on purpose. -- Dale 01234567890123456789012345678901234567890123456789012345678901234567890123456789 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list