Re: [PATCH 1/2] enable establishing wpa connection in "early networking"

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

 



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


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux